Files
worldmonitor/scripts
Elie Habib 3d365ffad8 fix(relay): extend Redis TTL from 2x to 6x seed interval to survive relay downtime (#1898)
* fix(cable-health): extend Redis TTL from 1h to 24h to survive relay downtime

CACHE_TTL was 3600s (1h). Relay pings every 30min. Two consecutive missed
pings expired the key, leaving health.js reading null and reporting EMPTY.
cachedFetchJson is cache-aside, not stale-while-revalidate: once the key
expires from Redis there is no stale fallback at the health.js layer.
24h TTL keeps the key alive through multi-hour relay outages; the 30min
warm-ping still keeps data fresh in normal operation.

* fix(relay): extend 2x-interval TTLs to 6x to survive relay downtime

Keys with TTL=2x their seed interval expire after just one missed ping.
Same root cause as cable-health (CACHE_TTL=3600 with 30min ping).

Changes:
- CHOKEPOINT_TRANSIT_TTL: 1200s → 3600s (10min interval)
- TRANSIT_SUMMARY_TTL:    1200s → 3600s (10min interval)
- WEATHER_CACHE_TTL:      1800s → 5400s (15min interval)
- AVIATION_SEED_TTL:      3600s → 10800s (30min interval, intl delays)
- NOTAM_SEED_TTL:         3600s → 10800s (30min interval)

All now at 6x their seed interval, matching the gold standard pattern.

* test: update TRANSIT_SUMMARY_TTL assertion to require 6x interval minimum
2026-03-19 23:34:35 +04:00
..