From f1b5abd704a1d485ae7e28ad5d2e4ee3e5a2fc6e Mon Sep 17 00:00:00 2001 From: italojohnny Date: Mon, 3 Jun 2024 18:18:10 -0300 Subject: [PATCH] fix bug: flow_id --- src/backend/base/langflow/api/v1/chat.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/backend/base/langflow/api/v1/chat.py b/src/backend/base/langflow/api/v1/chat.py index 10aec1e36..9ee3d8f4f 100644 --- a/src/backend/base/langflow/api/v1/chat.py +++ b/src/backend/base/langflow/api/v1/chat.py @@ -210,13 +210,12 @@ async def build_vertex( duration = format_elapsed_time(timedelta) result_data_response.duration = duration result_data_response.timedelta = timedelta - async with chat_service._cache_locks[flow_id] as lock: - vertex.add_build_time(timedelta) - inactivated_vertices = None - inactivated_vertices = list(graph.inactivated_vertices) - graph.reset_inactivated_vertices() - graph.reset_activated_vertices() - await chat_service.set_cache(flow_id=flow_id, data=graph, lock=lock) + vertex.add_build_time(timedelta) + inactivated_vertices = None + inactivated_vertices = list(graph.inactivated_vertices) + graph.reset_inactivated_vertices() + graph.reset_activated_vertices() + await chat_service.set_cache(flow_id_str, graph) # graph.stop_vertex tells us if the user asked # to stop the build of the graph at a certain vertex