add async with all functions

This commit is contained in:
2026-10-23 00:20:58 +03:00
parent a85702a30e
commit 7b7ca1b888
42 changed files with 901 additions and 763 deletions
+2 -4
View File
@@ -9,13 +9,11 @@ router = APIRouter(prefix="/health", tags=["health"])
@router.get("/live")
async def liveness() -> Health:
# Только «процесс жив»: БД намеренно не трогаем.
return Health(status="ok")
@router.get("/ready")
def readiness(request: Request) -> Health:
# Готовность = приложение может обслужить синхронный путь, а он требует БД.
if not check_database(request.app.state.engine):
async def readiness(request: Request) -> Health:
if not await check_database(request.app.state.engine):
raise unavailable()
return Health(status="ok")