fix: expose formal provider status in source health
All checks were successful
2026 World Cup Quant Platform - Production Deployment / Code Quality, Security Gate & Testing (push) Successful in 4m18s
2026 World Cup Quant Platform - Production Deployment / Deploy to Production VM via Gitea CD (push) Successful in 1m22s

This commit is contained in:
OG T
2026-06-19 01:38:00 +08:00
parent c5638d2087
commit f26def598f

View File

@@ -708,6 +708,8 @@ class MatchDetailResponse(BaseModel):
class SourceHealthResponse(BaseModel):
status: str
odds_coverage_status: str = 'unknown'
formal_provider_status: dict[str, Any] = Field(default_factory=dict)
formal_provider_blocker: str | None = None
upcoming_odds_matches: int = 0
stale_unsettled_matches: int = 0
stale_unsettled_threshold_hours: int = 3
@@ -867,6 +869,8 @@ async def analytics_source_health() -> SourceHealthResponse:
return SourceHealthResponse(
status=freshness_status,
odds_coverage_status=odds_coverage_status,
formal_provider_status=primary_provider_status,
formal_provider_blocker=formal_provider_blocker,
upcoming_odds_matches=upcoming_odds_matches,
stale_unsettled_matches=stale_unsettled_matches,
stale_unsettled_threshold_hours=stale_threshold_hours,