|
|
@@ -324,6 +324,8 @@ def sync_agents_v2():
|
|
|
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 @@ def sync_knowledge():
|
|
|
print("sync knowledge successfully")
|
|
|
except Exception as e:
|
|
|
print(f"Failed to sync knowledge: {str(e)}")
|
|
|
+ finally:
|
|
|
+ db.close()
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|