Skip to content

Commit

Permalink
Added OBJECT_DELETED event
Browse files Browse the repository at this point in the history
  • Loading branch information
ammar92 committed Sep 11, 2024
1 parent 414a5a9 commit 42a297c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions octopoes/octopoes/connector/octopoes.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from octopoes.models.transaction import TransactionRecord
from octopoes.models.tree import ReferenceTree
from octopoes.models.types import OOIType
from octopoes.types import DECLARATION_CREATED, OBSERVATION_CREATED, ORIGIN_DELETED
from octopoes.types import DECLARATION_CREATED, OBJECT_DELETED, OBSERVATION_CREATED, ORIGIN_DELETED


class OctopoesAPIConnector:
Expand Down Expand Up @@ -227,7 +227,7 @@ def delete(self, reference: Reference, valid_time: datetime) -> None:
params = {"reference": str(reference), "valid_time": str(valid_time)}
self.session.delete(f"/{self.client}/", params=params)

self.logger.info("Deleted object", reference=reference, valid_time=valid_time)
self.logger.info("Deleted object", reference=reference, valid_time=valid_time, event_code=OBJECT_DELETED)

def delete_many(self, references: list[Reference], valid_time: datetime) -> None:
params = {"valid_time": str(valid_time)}
Expand Down
1 change: 1 addition & 0 deletions octopoes/octopoes/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
DECLARATION_CREATED = 100201
AFFIRMATION_CREATED = 100301
ORIGIN_DELETED = 100403
OBJECT_DELETED = 100503

0 comments on commit 42a297c

Please sign in to comment.