AnishDev's picture
initial code and logic pushed
ff7b177
Raw History Blame Contribute Delete
308 Bytes
from fastapi import APIRouter
from app.services import storage
router = APIRouter(tags=["health"])
@router.get("/health")
def health_check():
redis_ok = storage.ping()
return {
"status": "ok" if redis_ok else "degraded",
"redis": "connected" if redis_ok else "disconnected",
}