From 872ff0830451f4b3a02edf9b715115bfb010db06 Mon Sep 17 00:00:00 2001 From: Jack Date: Mon, 27 Apr 2026 22:38:43 +0800 Subject: [PATCH] Fix: add executor.shutdown (#14403) ### What problem does this PR solve? Add executor shutdown in finally clause to free resources. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- rag/svr/task_executor.py | 1 + 1 file changed, 1 insertion(+) diff --git a/rag/svr/task_executor.py b/rag/svr/task_executor.py index 4144e9cbb8..f1edd45f7a 100644 --- a/rag/svr/task_executor.py +++ b/rag/svr/task_executor.py @@ -1289,6 +1289,7 @@ async def do_handle_task(task): ) finally: + executor.shutdown(wait=False) if has_canceled(task_id): try: exists = await thread_pool_exec(