From bb05d6063d86559f62a4a2cc5063c170ff4f0cd7 Mon Sep 17 00:00:00 2001 From: Marc 'risson' Schmitt Date: Mon, 30 Jun 2025 04:30:24 +0200 Subject: [PATCH] saner values for tenacity Signed-off-by: Marc 'risson' Schmitt --- .../django_dramatiq_postgres/broker.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/django-dramatiq-postgres/django_dramatiq_postgres/broker.py b/packages/django-dramatiq-postgres/django_dramatiq_postgres/broker.py index e368eb024f..648998c3a9 100644 --- a/packages/django-dramatiq-postgres/django_dramatiq_postgres/broker.py +++ b/packages/django-dramatiq-postgres/django_dramatiq_postgres/broker.py @@ -130,8 +130,8 @@ class PostgresBroker(Broker): ) ), reraise=True, - wait=tenacity.wait_random_exponential(multiplier=1, max=30), - stop=tenacity.stop_after_attempt(10), + wait=tenacity.wait_random_exponential(multiplier=1, max=5), + stop=tenacity.stop_after_attempt(3), before_sleep=tenacity.before_sleep_log(logger, logging.INFO, exc_info=True), ) def enqueue(self, message: Message, *, delay: int | None = None) -> Message: