From ec29bcf013891c39e9fc02607d41788bde5185f5 Mon Sep 17 00:00:00 2001 From: -LAN- Date: Wed, 9 Apr 2025 18:02:47 +0900 Subject: [PATCH] feat(graph_engine): yield control to other threads before node run. (#17689) Signed-off-by: -LAN- --- api/core/workflow/graph_engine/graph_engine.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/core/workflow/graph_engine/graph_engine.py b/api/core/workflow/graph_engine/graph_engine.py index d0f3041d5d..36273d8ec1 100644 --- a/api/core/workflow/graph_engine/graph_engine.py +++ b/api/core/workflow/graph_engine/graph_engine.py @@ -641,6 +641,8 @@ class GraphEngine: try: # run node retry_start_at = datetime.now(UTC).replace(tzinfo=None) + # yield control to other threads + time.sleep(0.001) generator = node_instance.run() for item in generator: if isinstance(item, GraphEngineEvent):