Checkpoint before follow-up message

Co-authored-by: jxxghp <jxxghp@live.cn>
This commit is contained in:
Cursor Agent
2025-08-20 12:10:52 +00:00
parent b3113e13ec
commit d4d2f58830

View File

@@ -4,6 +4,7 @@ from app.core.config import settings
from app.db import SessionFactory
from app.modules import _ModuleBase
from app.schemas.types import ModuleType, OtherModulesType
from sqlalchemy import text
class PostgreSQLModule(_ModuleBase):
@@ -54,7 +55,7 @@ class PostgreSQLModule(_ModuleBase):
# 测试数据库连接
db = SessionFactory()
try:
db.execute("SELECT 1")
db.execute(text("SELECT 1"))
except Exception as e:
return False, f"PostgreSQL连接失败{e}"
finally: