From 6802329055ed7a766c8735fcba92b5d8f94dd251 Mon Sep 17 00:00:00 2001 From: Novice Lee Date: Mon, 23 Dec 2024 13:56:07 +0800 Subject: [PATCH] fix: log order wrong --- api/core/app/apps/workflow_app_runner.py | 2 +- api/core/workflow/graph_engine/entities/event.py | 1 - api/core/workflow/graph_engine/graph_engine.py | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/api/core/app/apps/workflow_app_runner.py b/api/core/app/apps/workflow_app_runner.py index fb71e0b1e3..885283504b 100644 --- a/api/core/app/apps/workflow_app_runner.py +++ b/api/core/app/apps/workflow_app_runner.py @@ -211,7 +211,7 @@ class WorkflowBasedAppRunner(AppRunner): parent_parallel_id=event.parent_parallel_id, parent_parallel_start_node_id=event.parent_parallel_start_node_id, start_at=event.start_at, - node_run_index=event.node_run_index, + node_run_index=event.route_node_state.index, predecessor_node_id=event.predecessor_node_id, in_iteration_id=event.in_iteration_id, parallel_mode_run_id=event.parallel_mode_run_id, diff --git a/api/core/workflow/graph_engine/entities/event.py b/api/core/workflow/graph_engine/entities/event.py index 6a65403d2c..d591b68e7e 100644 --- a/api/core/workflow/graph_engine/entities/event.py +++ b/api/core/workflow/graph_engine/entities/event.py @@ -101,7 +101,6 @@ class NodeRunRetryEvent(NodeRunStartedEvent): error: str = Field(..., description="error") retry_index: int = Field(..., description="which retry attempt is about to be performed") start_at: datetime = Field(..., description="retry start time") - node_run_index: int = Field(..., description="retry run index") ########################################### diff --git a/api/core/workflow/graph_engine/graph_engine.py b/api/core/workflow/graph_engine/graph_engine.py index 2bb74babe7..d7d33c65fc 100644 --- a/api/core/workflow/graph_engine/graph_engine.py +++ b/api/core/workflow/graph_engine/graph_engine.py @@ -641,7 +641,6 @@ class GraphEngine: run_result.status = WorkflowNodeExecutionStatus.SUCCEEDED if node_instance.should_retry and retries < max_retries: retries += 1 - self.graph_runtime_state.node_run_steps += 1 route_node_state.node_run_result = run_result yield NodeRunRetryEvent( id=node_instance.id, @@ -657,7 +656,6 @@ class GraphEngine: error=run_result.error, retry_index=retries, start_at=retry_start_at, - node_run_index=self.graph_runtime_state.node_run_steps, ) time.sleep(retry_interval) continue