Skip to content

LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows

adding maximum retry count for chord for file processing worker (#1352)

ali5ac99abee275
diff --git a/backend/backend/workers/file_processing/celery_config.py b/backend/backend/workers/file_processing/celery_config.py
index 629c314fa..5811eaae3 100644
--- a/backend/backend/workers/file_processing/celery_config.py
+++ b/backend/backend/workers/file_processing/celery_config.py
@@ -1,3 +1,5 @@
+import os
+
from kombu import Queue
from backend.celery_config import CeleryConfig as BaseCeleryConfig
@@ -17,4 +19,15 @@ class CeleryConfig(BaseCeleryConfig):
task_default_queue = QueueNames.FILE_PROCESSING
+ task_annotations = {
+ "celery.chord_unlock": {
+ "max_retries": int(
+ os.environ.get("FILE_PROCESSING_CELERY_RESULT_CHORD_RETRY_COUNT", 3)
+ ), # Number of retries for chord unlock
+ "default_retry_delay": int(
+ os.environ.get("FILE_PROCESSING_CELERY_RESULT_CHORD_RETRY_INTERVAL", 1)
+ ), # Delay in seconds between retries
+ }
+ }
+
imports = ["workflow_manager.workflow_v2.file_execution_tasks"]