Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EventHubs] Buffered Producer #24362

Merged
Prev Previous commit
Next Next commit
remove comment
  • Loading branch information
kashifkhan committed May 23, 2022
commit 1d5e9d6ccfa9aeb04658e2c8ab85b4b18b4741ef
Original file line number Diff line number Diff line change
@@ -137,7 +137,6 @@ def flush(self, timeout_time=None, raise_error=True):
self._cur_batch = EventDataBatch(self._max_message_size_on_link)
while self._cur_buffered_len:
remaining_time = timeout_time - time.time() if timeout_time else None
# If flush could get the semaphore, perform sending
if ((remaining_time and remaining_time > 0) or remaining_time is None):
batch = self._buffered_queue.get()
self._buffered_queue.task_done()
Original file line number Diff line number Diff line change
@@ -140,7 +140,6 @@ async def flush(self, timeout_time=None, raise_error=True):
self._cur_batch = EventDataBatch(self._max_message_size_on_link)
while self._cur_buffered_len:
remaining_time = timeout_time - time.time() if timeout_time else None
# If flush could get the semaphore, perform sending
if ((remaining_time and remaining_time > 0) or remaining_time is None):
batch = self._buffered_queue.get()
self._buffered_queue.task_done()