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

[pyAMQP] Batch being passed in as kwargs in do_work #25308

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ async def _receive_message_batch_impl_async(self, max_batch_size=None, on_messag

try:
await asyncio.wait_for(
self.do_work_async(batch=to_receive_size),
self.do_work_async(),
timeout=timeout_time - now_time if timeout else None
)
except asyncio.TimeoutError:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,8 @@ def _receive_message_batch_impl(self, max_batch_size=None, on_message_received=N
if timeout and time.time() > timeout:
break

receiving = self.do_work(batch=to_receive_size)
#removed to_receive_size
receiving = self.do_work()
cur_queue_size = self._received_messages.qsize()
# after do_work, check how many new messages have been received since previous iteration
received = cur_queue_size - before_queue_size
Expand Down