fix: /health/ready dict handling
This commit is contained in:
@@ -52,7 +52,9 @@ async def health_ready() -> ReadyResponse:
|
||||
checks = {}
|
||||
all_ready = True
|
||||
|
||||
for check_name, check_val in (health.checks or {}).items():
|
||||
# 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"
|
||||
checks[check_name] = status
|
||||
if status != "ok":
|
||||
|
||||
Reference in New Issue
Block a user