21 lines
559 B
Python
21 lines
559 B
Python
"""Health check endpoint — extended with DB, Redis, storage, worker checks."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from fastapi import APIRouter
|
|
|
|
from app.core.monitoring import get_health_status
|
|
from app.schemas.common import HealthResponse
|
|
|
|
router = APIRouter(tags=["health"])
|
|
|
|
|
|
@router.get("/api/v1/health", response_model=HealthResponse)
|
|
async def health():
|
|
"""Health check — no auth required.
|
|
|
|
Returns status (healthy/degraded) and individual checks for
|
|
database, redis, storage, and worker.
|
|
"""
|
|
return await get_health_status()
|