zenith-backend / app /health.py
teoat's picture
Upload app/health.py with huggingface_hub
8c52d20 verified
from datetime import datetime
from fastapi import APIRouter
router = APIRouter(prefix="/health", tags=["health"])
@router.get("/")
async def health_check():
"""Comprehensive health check endpoint"""
return {
"status": "healthy",
"timestamp": datetime.utcnow().isoformat(),
"service": "zenith-backend",
"version": "1.0.0",
"uptime": "operational"
}
@router.get("/detailed")
async def detailed_health_check():
"""Detailed health check with component status"""
return {
"status": "healthy",
"timestamp": datetime.utcnow().isoformat(),
"service": "zenith-backend",
"components": {
"database": "healthy",
"cache": "healthy",
"message_queue": "healthy",
"monitoring": "operational"
},
"metrics": {
"response_time": "<100ms",
"cpu_usage": "<50%",
"memory_usage": "<70%"
}
}