diff --git a/app/routes/health.py b/app/routes/health.py index bfb9eb3..92798b1 100644 --- a/app/routes/health.py +++ b/app/routes/health.py @@ -55,7 +55,12 @@ async def health_ready() -> ReadyResponse: # health is a dict (or HealthResponse), handle both health_checks = health.get('checks', {}) if isinstance(health, dict) else (health.checks or {}) for check_name, check_val in health_checks.items(): - status = "ok" if check_val == "ok" or check_val is True else "fail" + # Handle both string status and dict with status key + if isinstance(check_val, dict): + status_val = check_val.get("status", "unknown") + else: + status_val = str(check_val) + status = "ok" if status_val in ("ok", "up", "healthy", "true", "True") else "fail" checks[check_name] = status if status != "ok": all_ready = False