R12: Fix readiness — stale/failed community_scheduler blocks ready

- Add 'ready = ready and healthy' for community_scheduler check
- Add 'ready = False' for community_scheduler exception path
- Add 3 unit tests: success=ready, stale=not_ready, failed=not_ready
- Monitoring now correctly reports community import health
This commit is contained in:
ik
2026-09-10 05:46:49 +07:00
parent 39f66481be
commit cc3b42eaf6
2 changed files with 68 additions and 1 deletions
+2
View File
@@ -78,7 +78,9 @@ def readiness_report(
"status": "ready" if healthy else ("stale" if stale else latest_community.status),
"last_started_at": started.isoformat(),
}
ready = ready and healthy
except Exception:
components["community_scheduler"] = {"status": "unknown"}
ready = False
return ready, components