From 7a4f38d7a3e27ad7d86c51dab2348f877a34a05d Mon Sep 17 00:00:00 2001 From: zhaoqingang <zhaoqg0118@163.com> Date: 星期二, 24 十二月 2024 10:54:02 +0800 Subject: [PATCH] 定时刷新 --- app/task/fetch_agent.py | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/app/task/fetch_agent.py b/app/task/fetch_agent.py index 303d8f6..a97f59b 100644 --- a/app/task/fetch_agent.py +++ b/app/task/fetch_agent.py @@ -324,6 +324,8 @@ print("v2 Agents synchronized successfully") except Exception as e: print(f"v2 Failed to sync agents: {str(e)}") + finally: + db.close() def update_ids_in_local_knowledge(data, klg_type): type_dict = {"1": RAGFLOW, "2": BISHENG, "4": DIFY} @@ -386,6 +388,8 @@ print("sync knowledge successfully") except Exception as e: print(f"Failed to sync knowledge: {str(e)}") + finally: + db.close() if __name__ == "__main__": -- Gitblit v1.8.0