feat: add database configuration and health check

This commit is contained in:
Schubert Ferenc 2026-07-01 20:50:17 +02:00
parent 3d53a94d59
commit 3701c50711
9 changed files with 72 additions and 2 deletions

View file

@ -0,0 +1,12 @@
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