From ded93bf24fe53b96f398daa2e0ea6caf4d73cad0 Mon Sep 17 00:00:00 2001 From: Florent Chehab Date: Fri, 24 Jul 2026 09:58:58 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B(summary)=20retry=20on=20RequestExc?= =?UTF-8?q?eption=20instead=20of=20HTTPError?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Request may fail for other reasons than HTTPError (ConnectionError for instance). This change switches to the more generalized error for the retry logic on call webhook & transcribe audio --- src/summary/summary/core/celery_worker.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/summary/summary/core/celery_worker.py b/src/summary/summary/core/celery_worker.py index 11db588a..ffcea4bf 100644 --- a/src/summary/summary/core/celery_worker.py +++ b/src/summary/summary/core/celery_worker.py @@ -431,7 +431,7 @@ def _should_auto_create_summary(payload: TranscribeTaskJob) -> bool: @celery.task( max_retries=3, queue=settings.call_webhook_queue_v2, - autoretry_for=[exceptions.HTTPError], + autoretry_for=[exceptions.RequestException], ) def call_webhook_v2_task( payload: dict, @@ -445,7 +445,9 @@ def call_webhook_v2_task( @celery.task( bind=True, - autoretry_for=[exceptions.HTTPError], + autoretry_for=[ + exceptions.RequestException, + ], max_retries=settings.celery_max_retries, queue=settings.transcribe_queue_v2, )