Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
liuzhenghua committed Jan 10, 2025
1 parent 989fb11 commit 7cbaef6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion api/core/workflow/graph_engine/graph_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,13 @@ def _run(
next_node_id = final_node_id

if in_parallel_id and self.graph.node_parallel_mapping.get(next_node_id, "") != in_parallel_id:
break
source_edges = self.graph.reverse_edge_mapping.get(next_node_id, [])
source_node_ids = {edge.source_node_id for edge in source_edges}
if len(source_node_ids) == 1:
# if -> node1, node2, else -> node2. the current path follows the else branch.
in_parallel_id = self.graph.node_parallel_mapping.get(next_node_id, "")
else:
break

def _run_parallel_branches(
self,
Expand Down

0 comments on commit 7cbaef6

Please sign in to comment.