mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: Return the link to the connection pool after the node execution is completed (#3919)
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
This commit is contained in:
parent
4c878b011a
commit
a0dc4c0648
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue