diff --git a/app/api/dependencies/healthcheck.py.jinja b/app/api/dependencies/healthcheck.py.jinja index fe85dad..477baba 100644 --- a/app/api/dependencies/healthcheck.py.jinja +++ b/app/api/dependencies/healthcheck.py.jinja @@ -7,6 +7,7 @@ from typing import Optional from fastapi import Depends, Request from pybotx import Bot +from sqlalchemy.sql import text {% if add_worker -%} from app.settings import settings @@ -22,7 +23,7 @@ async def check_db_connection(request: Request) -> Optional[str]: async with session_factory() as db_session: try: - await db_session.execute("SELECT 1") + await db_session.execute(text("SELECT 1")) except Exception as exc: return str(exc)