Skip to content

Commit

Permalink
fix: make sure RabbitMQ broker’s enqueue() attempts the correct numbe…
Browse files Browse the repository at this point in the history
…r of preset retries (#669)
  • Loading branch information
jenstroeger authored Dec 22, 2024
1 parent 4dd0d71 commit b372f43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dramatiq/brokers/rabbitmq.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit b372f43

Please sign in to comment.