mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-03-20 03:57:30 +08:00
Checkpoint before follow-up message
Co-authored-by: jxxghp <jxxghp@live.cn>
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user