completed parallel tests

This commit is contained in:
takatost
2024-07-10 21:21:06 +08:00
parent 0e885a3cae
commit d77b689a99
2 changed files with 662 additions and 3 deletions

View File

@ -234,7 +234,7 @@ class Graph(BaseModel):
if len(target_node_edges) > 1:
# fetch all node ids in current parallels
parallel_node_ids = [graph_edge.target_node_id
for graph_edge in target_node_edges if graph_edge.run_condition is not None]
for graph_edge in target_node_edges if graph_edge.run_condition is None]
# any target node id in node_parallel_mapping
if parallel_node_ids:
@ -251,7 +251,10 @@ class Graph(BaseModel):
parallel_node_ids=parallel_node_ids
)
node_parallel_mapping.update({node_id: parallel.id for node_id in in_branch_node_ids})
# collect all branches node ids
for branch_node_id, node_ids in in_branch_node_ids.items():
for node_id in node_ids:
node_parallel_mapping[node_id] = parallel.id
for graph_edge in target_node_edges:
cls._recursively_add_parallels(