cleanup and fix runtime bugs
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
"""Health endpoint."""
|
||||
# Роут проверки доступности сервиса и соединения с БД.
|
||||
|
||||
from fastapi import APIRouter, Depends
|
||||
from sqlalchemy import text
|
||||
@@ -11,7 +11,7 @@ router = APIRouter()
|
||||
|
||||
@router.get("/health")
|
||||
def health_check(persistence: PersistenceService = Depends(get_persistence)):
|
||||
"""Проверка API и БД."""
|
||||
# Проверка API и БД
|
||||
db_ok = False
|
||||
try:
|
||||
with persistence.session_scope() as session:
|
||||
|
||||
Reference in New Issue
Block a user