🔧(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:
committed by
aleb_the_flash
parent
50146e95f4
commit
a6b6cb7787
@@ -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.
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user