mirror of
https://github.com/langgenius/dify.git
synced 2026-03-29 01:49:57 +08:00
fix(api): Ensure is_resumption for node_started event is correctly set
This commit is contained in:
@ -236,3 +236,10 @@ class GraphExecution:
|
||||
def record_node_failure(self) -> None:
|
||||
"""Increment the count of node failures encountered during execution."""
|
||||
self.exceptions_count += 1
|
||||
|
||||
def is_node_resumption(self, node_id: str, execution_id: str) -> bool:
|
||||
"""Return True if the node is resuming a previously started execution."""
|
||||
node_execution = self.node_executions.get(node_id)
|
||||
if not node_execution or not node_execution.execution_id:
|
||||
return False
|
||||
return str(node_execution.execution_id) == execution_id
|
||||
|
||||
@ -131,9 +131,6 @@ class EventHandler:
|
||||
node_execution.mark_started(event.id)
|
||||
self._graph_runtime_state.increment_node_run_steps()
|
||||
|
||||
# Mark whether this start is part of a resume flow
|
||||
event.is_resumption = self._graph_runtime_state.consume_resuming_node(event.node_id)
|
||||
|
||||
# Track in response coordinator for stream ordering
|
||||
self._response_coordinator.track_node_execution(event.node_id, event.id)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user