LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows
Python ai-agentsdata-engineeringdocument-aigenerative-aiidpjson-extractionllmmcp-serverocrpdf-extractionprompt-engineeringstructured-output
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.pyindex bbc0d7a1c..a34d60cbf 100644--- a/workers/general/tasks.py+++ b/workers/general/tasks.py@@ -17,7 +17,6 @@ from shared.api import InternalAPIClientfrom shared.data.models import (CallbackTaskData,WorkerTaskResponse,- WorkflowExecutionStatusUpdate,)from shared.enums.status_enums import PipelineStatusfrom 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 workerlogger.info(- f"Successfully completed general workflow execution {execution_id}"+ f"Successfully orchestrated general workflow execution {execution_id} (files processing asynchronously)")response = WorkerTaskResponse.success_response(