Skip to content

Commit

Permalink
Revisions in event stream descriptors
Browse files Browse the repository at this point in the history
  • Loading branch information
Kezzsim committed Feb 1, 2024
1 parent 5c34a7b commit 63ed99b
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions databroker/mongo_normalized.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,25 +470,11 @@ def metadata(self):
return metadata

async def update_metadata(self, metadata=None, specs=None):
if("start" not in metadata):
if("descriptors" not in metadata):
raise NotImplementedError('update_metadata method not implemented')
elif(specs is not None):
raise NotImplementedError('Updating of specs is not yet supported.')
start = metadata["start"]
# stop = metadata["stop"]
try:
schema_validators[DocumentNames.start].validate(start)
# schema_validators[DocumentNames.stop].validate(stop)
except ValidationError as err:
raise
# Update start
self._serializer.update("start", metadata["start"])
# Update descriptors
# TODO: uncomment when support is added in suitcase mongo
# for descriptor in metadata["descriptors"]:
# self.serializer.update("descriptor", descriptor)
# Update stop
# self._serializer.update("stop", metadata["stop"])
for descriptor in metadata["descriptors"]:
self.serializer.update("descriptor", descriptor) # self._serializer.update("stop", metadata["stop"])


def new_variation(self, **kwargs):
Expand Down

0 comments on commit 63ed99b

Please sign in to comment.