From f5f5141cc428cf9087e46c9f50381217e0a4d36e Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Fri, 12 Jul 2024 17:26:05 -0300 Subject: [PATCH] fix: check if vertex is in vertices_being_run to check if it is runnable (#2668) Co-authored-by: Cristhian Zanforlin Lousa <72977554+Cristhianzl@users.noreply.github.com> --- .../base/langflow/graph/graph/runnable_vertices_manager.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/backend/base/langflow/graph/graph/runnable_vertices_manager.py b/src/backend/base/langflow/graph/graph/runnable_vertices_manager.py index fb9e120b6..b1dd8990f 100644 --- a/src/backend/base/langflow/graph/graph/runnable_vertices_manager.py +++ b/src/backend/base/langflow/graph/graph/runnable_vertices_manager.py @@ -50,7 +50,10 @@ class RunnableVerticesManager: """Determines if a vertex is runnable.""" return ( - vertex.is_active() and self.are_all_predecessors_fulfilled(vertex.id) and vertex.id in self.vertices_to_run + vertex.is_active() + and self.are_all_predecessors_fulfilled(vertex.id) + and vertex.id in self.vertices_to_run + and vertex.id not in self.vertices_being_run ) def are_all_predecessors_fulfilled(self, vertex_id: str) -> bool: