🔧(summary) make celery max retries an env configurations

Minor tweak ! It would be useful when we'll scale or microservice.
This commit is contained in:
lebaudantoine
2024-11-30 00:31:40 +01:00
committed by aleb_the_flash
parent 50146e95f4
commit a6b6cb7787
2 changed files with 2 additions and 1 deletions

View File

@@ -59,7 +59,7 @@ def post_with_retries(url, data):
session.close()
@celery.task(max_retries=1)
@celery.task(max_retries=settings.celery_max_retries)
def process_audio_transcribe_summarize(filename: str, email: str, sub: str):
"""Process an audio file by transcribing it and generating a summary.

View File

@@ -19,6 +19,7 @@ class Settings(BaseSettings):
# Celery settings
celery_broker_url: str = "redis://redis/0"
celery_result_backend: str = "redis://redis/0"
celery_max_retries: int = 1
# Minio settings
aws_storage_bucket_name: str