Fix should_run_vertex method to remove vertex_id from vertices_to_run list
This commit is contained in:
parent
f2ccff0d21
commit
3985236224
2 changed files with 5 additions and 1 deletions
|
|
@ -128,6 +128,7 @@ async def build_vertex(
|
||||||
next_vertices_ids = [
|
next_vertices_ids = [
|
||||||
v for v in next_vertices_ids if graph.should_run_vertex(v)
|
v for v in next_vertices_ids if graph.should_run_vertex(v)
|
||||||
]
|
]
|
||||||
|
|
||||||
result_data_response = ResultDataResponse(**result_dict.model_dump())
|
result_data_response = ResultDataResponse(**result_dict.model_dump())
|
||||||
|
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
|
|
|
||||||
|
|
@ -787,7 +787,10 @@ class Graph:
|
||||||
|
|
||||||
def should_run_vertex(self, vertex_id: str) -> bool:
|
def should_run_vertex(self, vertex_id: str) -> bool:
|
||||||
"""Returns whether a component should be run."""
|
"""Returns whether a component should be run."""
|
||||||
return vertex_id in self.vertices_to_run
|
should_run = vertex_id in self.vertices_to_run
|
||||||
|
if should_run:
|
||||||
|
self.vertices_to_run.remove(vertex_id)
|
||||||
|
return should_run
|
||||||
|
|
||||||
def sort_interface_components_first(
|
def sort_interface_components_first(
|
||||||
self, vertices_layers: List[List[str]]
|
self, vertices_layers: List[List[str]]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue