From a0dc4c0648647a0be41db3fcd6bfded3eef8de41 Mon Sep 17 00:00:00 2001 From: shaohuzhang1 <80892890+shaohuzhang1@users.noreply.github.com> Date: Fri, 22 Aug 2025 17:44:10 +0800 Subject: [PATCH] fix: Return the link to the connection pool after the node execution is completed (#3919) --- apps/application/flow/workflow_manage.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/application/flow/workflow_manage.py b/apps/application/flow/workflow_manage.py index 3964b04f1..7ac65d1ea 100644 --- a/apps/application/flow/workflow_manage.py +++ b/apps/application/flow/workflow_manage.py @@ -14,7 +14,7 @@ from concurrent.futures import ThreadPoolExecutor from functools import reduce from typing import List, Dict -from django.db import close_old_connections +from django.db import close_old_connections, connection from django.db.models import QuerySet from django.utils import translation from django.utils.translation import get_language @@ -569,6 +569,8 @@ class WorkflowManage: return None finally: current_node.node_chunk.end() + # 归还链接 + connection.close() def run_node_async(self, node): future = executor.submit(self.run_node, node)