create skeleton for lab 4

This commit is contained in:
2026-11-04 21:27:54 +03:00
parent ec540a1a72
commit 8503c1b6cd
133 changed files with 10856 additions and 40 deletions
+20
View File
@@ -0,0 +1,20 @@
from fastapi import APIRouter, Request
from app.domain import health
from app.schemas.base import Health
router = APIRouter(prefix='/health', tags=['health'])
@router.get('/live')
async def liveness() -> Health:
return health.liveness()
@router.get('/ready')
async def readiness(request: Request) -> Health:
state = request.app.state
return await health.readiness(
state.engine, state.redis, state.s3, state.lifecycle,
state.settings.readiness_timeout_seconds,
)