Fix database health check by properly using SQLAlchemy text()
This commit is contained in:
parent
652f32404a
commit
70cb768862
@ -14,7 +14,8 @@ def health_check(db: Session = Depends(get_db)):
|
|||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
# Check database connection
|
# Check database connection
|
||||||
db.execute(text("SELECT 1"))
|
query = text("SELECT 1")
|
||||||
|
db.execute(query)
|
||||||
db.commit()
|
db.commit()
|
||||||
db_status = "healthy"
|
db_status = "healthy"
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user