diff --git a/dramatiq/brokers/rabbitmq.py b/dramatiq/brokers/rabbitmq.py index de6c0657..ef1728b3 100644 --- a/dramatiq/brokers/rabbitmq.py +++ b/dramatiq/brokers/rabbitmq.py @@ -246,7 +246,7 @@ def declare_queue(self, queue_name, *, ensure=False): self._ensure_queue(queue_name) def _ensure_queue(self, queue_name): - attempts = 1 + attempts = 0 while True: try: if queue_name in self.queues_pending: @@ -321,7 +321,7 @@ def enqueue(self, message, *, delay=None): }, ) - attempts = 1 + attempts = 0 while True: try: self.declare_queue(canonical_queue_name, ensure=True)