Commit 7c5741f0 authored by Mikhail Karnevskiy's avatar Mikhail Karnevskiy
Browse files

Merge branch 'feat/stream_finish_once' into 'master'

Send stream finish flag only once

See merge request !36
parents a604da6e e9bae96d
Pipeline #13182 passed with stage
in 56 seconds
...@@ -170,10 +170,11 @@ class Streamer: ...@@ -170,10 +170,11 @@ class Streamer:
return None, None return None, None
except StreamFinishedError as err: except StreamFinishedError as err:
log.info("Stream is finished") log.info("Stream is finished")
self.stream_finished = True
self._handle_end_of_stream() self._handle_end_of_stream()
stream_info = self.receiver.get_stream_info() if not self.stream_finished:
self.worker.stream_finished(stream_info) stream_info = self.receiver.get_stream_info()
self.worker.stream_finished(stream_info)
self.stream_finished = True
left_msgs = len(self.receiver.get_unacknowledged_messages()) left_msgs = len(self.receiver.get_unacknowledged_messages())
log.info("Number of unacknowledged messages = %s", left_msgs) log.info("Number of unacknowledged messages = %s", left_msgs)
if left_msgs == 0 or self.receiver.n_resend_nacs == 0: if left_msgs == 0 or self.receiver.n_resend_nacs == 0:
......
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