Olympus/backend/hermes/app/db/health.py
2026-07-01 20:50:17 +02:00

12 lines
No EOL
261 B
Python

from sqlalchemy import text
from app.db.database import engine
def check_database() -> bool:
try:
with engine.connect() as connection:
connection.execute(text("SELECT 1"))
return True
except Exception:
return False