Skip to content

Commit

Permalink
Descriptors in event stream
Browse files Browse the repository at this point in the history
  • Loading branch information
Kezzsim committed Feb 1, 2024
1 parent be534ac commit 5c34a7b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions databroker/mongo_normalized.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,18 +276,19 @@ def metadata(self):
async def update_metadata(self, metadata=None, specs=None):
if("start" not in metadata):
raise NotImplementedError('update_metadata method not implemented')
elif(specs is not None):
elif(specs is None):
raise NotImplementedError('Updating of specs is not yet supported.')
start = metadata["start"]
# stop = metadata["stop"]
stop = metadata["stop"] if "stop" in metadata else None
try:
schema_validators[DocumentNames.start].validate(start)
# schema_validators[DocumentNames.stop].validate(stop)
if (stop is not None):
schema_validators[DocumentNames.stop].validate(stop)
except ValidationError as err:
raise
# Update start
self._serializer.update("start", metadata["start"])
# self._serializer.update("stop", metadata["stop"])
self._serializer.update("stop", metadata["stop"])

@property
def filler(self):
Expand Down

0 comments on commit 5c34a7b

Please sign in to comment.