Skip to content

armgit / meet

Public Imported from GitHub
0

Open source video conferencing app powered by LiveKit. Built with Django and React.

🔧(backend) refine Celery retry policy to HTTP errors only

lebaudantoine30cd6573ef75
diff --git a/src/summary/summary/core/celery_worker.py b/src/summary/summary/core/celery_worker.py
index 2cb139aa..a34a8350 100644
--- a/src/summary/summary/core/celery_worker.py
+++ b/src/summary/summary/core/celery_worker.py
@@ -12,7 +12,7 @@ from celery import Celery, signals
from celery.utils.log import get_task_logger
from minio import Minio
from mutagen import File
-from requests import Session
+from requests import Session, exceptions
from requests.adapters import HTTPAdapter
from urllib3.util import Retry
@@ -221,7 +221,11 @@ def process_audio_transcribe_summarize(filename: str, email: str, sub: str):
logger.debug("Response body: %s", response.text)
[email protected](bind=True, max_retries=settings.celery_max_retries)
+ bind=True,
+ autoretry_for=[exceptions.HTTPError],
+ max_retries=settings.celery_max_retries,
+)
def process_audio_transcribe_summarize_v2(
self, filename: str, email: str, sub: str, received_at: float
):