fix(ordering): correctly remove vertex from list of runnable vertices (#2554)

This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-07-05 10:30:54 -03:00 committed by GitHub
commit 3900c58983
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 8 deletions

View file

@ -105,13 +105,6 @@ async def retrieve_vertices_order(
first_layer = graph.sort_vertices()
else:
first_layer = graph.sort_vertices()
# When we send vertices to the frontend
# we need to remove them from the predecessors
# so they are not considered for building again
# which duplicates the results
for vertex_id in first_layer:
graph.remove_from_predecessors(vertex_id)
graph.remove_vertex_from_runnables(vertex_id)
# Now vertices is a list of lists
# We need to get the id of each vertex

View file

@ -107,7 +107,7 @@ class RunnableVerticesManager:
"""
async with lock:
self.remove_from_predecessors(vertex.id)
self.remove_vertex_from_runnables(vertex.id)
direct_successors_ready = [
v for v in vertex.successors_ids if self.is_vertex_runnable(v, graph.inactivated_vertices)
]