LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows
Python ai-agentsdata-engineeringdocument-aigenerative-aiidpjson-extractionllmmcp-serverocrpdf-extractionprompt-engineeringstructured-output
fix: Removed assert on task ID NULL, (#1147)
Chandrasekharan Mf96dedcb6a2e
diff --git a/backend/workflow_manager/workflow_v2/execution.py b/backend/workflow_manager/workflow_v2/execution.pyindex 770f9e8d4..2464200c5 100644--- a/backend/workflow_manager/workflow_v2/execution.py+++ b/backend/workflow_manager/workflow_v2/execution.py@@ -415,9 +415,11 @@ class WorkflowExecutionServiceHelper(WorkflowExecutionService):@staticmethoddef update_execution_task(execution_id: str, task_id: str) -> None:try:- assert (- task_id is not None- ), f"task_id is NULL for execution_id: {execution_id}"+ if not task_id:+ logger.warning(+ f"task_id: '{task_id}' is NULL / empty for "+ f"execution_id: {execution_id}, expected to have a UUID"+ )execution = WorkflowExecution.objects.get(pk=execution_id)# TODO: Review if status should be updated to EXECUTINGexecution.task_id = task_iddiff --git a/backend/workflow_manager/workflow_v2/workflow_helper.py b/backend/workflow_manager/workflow_v2/workflow_helper.pyindex d6643289d..f4c8a8582 100644--- a/backend/workflow_manager/workflow_v2/workflow_helper.py+++ b/backend/workflow_manager/workflow_v2/workflow_helper.py@@ -752,18 +752,21 @@ class WorkflowHelper:)return responseelse:- execution_result = WorkflowHelper.execute_bin(- schema_name=org_schema,+ task_id = current_task.request.id+ # TODO: Remove this if scheduled runs work+ StateStore.set(Account.ORGANIZATION_ID, org_schema)+ execution_result = WorkflowHelper.execute_workflow(+ organization_id=org_schema,+ task_id=task_id,workflow_id=workflow.id,execution_id=workflow_execution.id,hash_values_of_files=hash_values_of_files,scheduled=True,execution_mode=execution_mode,pipeline_id=pipeline_id,- log_events_id=log_events_id,use_file_history=use_file_history,+ log_events_id=log_events_id,)-updated_execution = WorkflowExecution.objects.get(id=execution_id)execution_response = ExecutionResponse(workflow.id,