From b2e99a0599bb330f366efcd75d1921a01c05dbea Mon Sep 17 00:00:00 2001 From: HuangHai <10402852@qq.com> Date: Fri, 11 Jul 2025 16:48:17 +0800 Subject: [PATCH] 'commit' --- dsLightRag/Start.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dsLightRag/Start.py b/dsLightRag/Start.py index fe180143..99d48902 100644 --- a/dsLightRag/Start.py +++ b/dsLightRag/Start.py @@ -14,6 +14,7 @@ from starlette.responses import StreamingResponse from starlette.staticfiles import StaticFiles from Util.LightRagUtil import * +from Util.PostgreSQLUtil import init_postgres_pool # 在程序开始时添加以下配置 logging.basicConfig( @@ -144,8 +145,8 @@ async def save_to_word(request: fastapi.Request): @app.get("/api/tree-data") async def get_tree_data(): try: - mysql_pool = await init_mysql_pool() - async with mysql_pool.acquire() as conn: + pg_pool = await init_postgres_pool() + async with pg_pool.acquire() as conn: await conn.ping() async with conn.cursor() as cur: await cur.execute(""" @@ -212,8 +213,8 @@ async def update_knowledge(request: fastapi.Request): if not node_id: raise ValueError("Missing node_id") - mysql_pool = await init_mysql_pool() - async with mysql_pool.acquire() as conn: + pg_pool = await init_postgres_pool() + async with pg_pool.acquire() as conn: await conn.ping() async with conn.cursor() as cur: if update_type == 'prerequisite':