Commit c4819717 authored by Mikhail Karnevskiy's avatar Mikhail Karnevskiy
Browse files

Add options to use default metadata substream always

parent cdc8091c
......@@ -322,6 +322,10 @@ class AsapoMetadataReceiver:
"and the worker will receive the complete stream.",
type=str)
default_substream=Config(
"Always use default substream",
type=bool, default=False, init=True)
@group_id.default
def _generate_group_id(self):
log.info("Generating new group id.")
......@@ -356,6 +360,8 @@ class AsapoMetadataReceiver:
Name of substream
"""
try:
if self.default_substream:
substream = 'default'
return self.broker.get_last(self.group_id, substream=substream)
except asapo_consumer.AsapoEndOfStreamError as err:
raise EndOfStreamError("End of metadata stream") from err
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment