Commit 7abf2836 authored by Tim Schoof's avatar Tim Schoof
Browse files

Allow meta_only streams

parent 7282977c
......@@ -20,12 +20,13 @@ def has_newer_substream(substream, substream_list):
class Streamer:
def __init__(
self, receiver, worker, delay_on_error=3,
end_of_stream_callback=None):
end_of_stream_callback=None, meta_only=False):
self.receiver = receiver
self.worker = worker
self.initial_delay_on_error = delay_on_error
self.delay_on_error = delay_on_error
self.end_of_stream_callback = end_of_stream_callback
self.meta_only = meta_only
self.likely_done = False
self.stopped = Event()
......@@ -48,7 +49,7 @@ class Streamer:
def _get_next(self):
try:
data, metadata = self.receiver.get_next(meta_only=False)
data, metadata = self.receiver.get_next(meta_only=self.meta_only)
except EndOfStreamError as err:
log.info(format_error(err))
self._handle_receiver_temporary_error()
......
Supports Markdown
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