fix(health): ignore future article timestamps; flag unset vessel/FIRMS keys #59
Loading…
Reference in a new issue
No description provided.
Delete branch "wt/t_ceb74e64"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
/api/healthchecks.articles.age_snow usesmax(timestamp)among rows withtimestamp IS NOT NULL AND timestamp <= now(), the same closed window asGET /api/news. Future-dated rows no longer produce a negative age. If every non-null timestamp is in the future,age_sis null andokis false.GET /api/statskeeps every existing counter (alertsis stillnws_alert_count) and addsfeeds.vessels.configured/feeds.fires.configured. True only whenAISSTREAM_API_KEYorVESSELAPI_API_KEY(vessels) orFIRMS_MAP_KEY(fires) has a non-empty value in theapi_keysstore. Env vars do not count. The value, a prefix, and the last-4 are not returned.Test plan
pytest tests/test_health_ready.py tests/test_api_stats.py -q— 12 passed, 0 failedage_sin 0..600 (was −518399 before the SQL filter)articles.age_snull,okfalsedocker login 127.0.0.1:3000is not this change.Child card
t_4f334c8bshould rebase ontowt/t_ceb74e64(head02a9a56) if this PR is still open.