Skip to content

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

UN-2865 [FIX] Remove premature COMPLETED status update in general worker after async file orchestration (#1574)

ali77e14eadf6cd
diff --git a/workers/general/tasks.py b/workers/general/tasks.py
index bbc0d7a1c..a34d60cbf 100644
--- a/workers/general/tasks.py
+++ b/workers/general/tasks.py
@@ -17,7 +17,6 @@ from shared.api import InternalAPIClient
from shared.data.models import (
CallbackTaskData,
WorkerTaskResponse,
- WorkflowExecutionStatusUpdate,
)
from shared.enums.status_enums import PipelineStatus
from shared.enums.task_enums import TaskName
@@ -270,24 +269,14 @@ def async_execute_bin_general(
**kwargs,
)
- # Calculate execution time
+ # Calculate orchestration time (not total execution time - callback worker calculates that)
execution_time = execution_result.get("execution_time", 0)
- # Update execution status to completed
- # Only include total_files if we have files to avoid overwriting with 0
- update_request = WorkflowExecutionStatusUpdate(
- execution_id=execution_id,
- status=ExecutionStatus.COMPLETED.value,
- execution_time=execution_time,
- total_files=len(hash_values_of_files) if hash_values_of_files else None,
- )
-
- api_client.update_workflow_execution_status(**update_request.to_dict())
-
+ # Status remains EXECUTING - callback worker will set COMPLETED/ERROR after all files finish
# Cache cleanup handled by callback worker
logger.info(
- f"Successfully completed general workflow execution {execution_id}"
+ f"Successfully orchestrated general workflow execution {execution_id} (files processing asynchronously)"
)
response = WorkerTaskResponse.success_response(