Skip to content

Commit

Permalink
fix: execute raw sql (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
kutuzov13 authored Mar 6, 2024
1 parent c9afc75 commit 32a8cae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/api/dependencies/healthcheck.py.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)

Expand Down

0 comments on commit 32a8cae

Please sign in to comment.