fix: remove the unused retry index field

This commit is contained in:
Novice Lee
2024-12-20 16:45:57 +08:00
parent dacd457478
commit 204d3146a0
14 changed files with 88 additions and 124 deletions

View File

@ -97,11 +97,11 @@ class NodeInIterationFailedEvent(BaseNodeEvent):
error: str = Field(..., description="error")
class NodeRunRetryEvent(BaseNodeEvent):
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")
start_index: int = Field(..., description="retry start index")
node_run_index: int = Field(..., description="retry run index")
###########################################

View File

@ -649,14 +649,15 @@ class GraphEngine:
node_type=node_instance.node_type,
node_data=node_instance.node_data,
route_node_state=route_node_state,
error=run_result.error,
retry_index=retries,
predecessor_node_id=node_instance.previous_node_id,
parallel_id=parallel_id,
parallel_start_node_id=parallel_start_node_id,
parent_parallel_id=parent_parallel_id,
parent_parallel_start_node_id=parent_parallel_start_node_id,
error=run_result.error,
retry_index=retries,
start_at=retry_start_at,
start_index=self.graph_runtime_state.node_run_steps,
node_run_index=self.graph_runtime_state.node_run_steps,
)
time.sleep(retry_interval)
continue