queue_processors: Gather statistics on queue worker operations.

This commit is contained in:
Mateusz Mandera
2020-03-18 20:48:49 +01:00
committed by Tim Abbott
parent f65e6d0d94
commit 5252b081bd
5 changed files with 76 additions and 2 deletions

View File

@@ -175,6 +175,9 @@ class SimpleQueueClient:
self.ensure_queue(queue_name, opened)
return messages
def queue_size(self) -> int:
return len(self.channel._pending_events)
def start_consuming(self) -> None:
self.channel.start_consuming()