Files
worldmonitor/scripts
Elie Habib a3405cd055 fix(health): prevent NOTAM closures from triggering DEGRADED status (#1536)
Three issues caused intermittent DEGRADED health:

1. When ICAO API returned empty (timeout, challenge page), the relay
   seed updated seed-meta but did not refresh the data key TTL. After
   1h the data key expired, health saw EMPTY, reported CRIT.
   Fix: call EXPIRE on the data key to extend TTL on empty response.

2. health.js dataSize() did not recognize the closedIcaos array field,
   falling back to Object.keys count (always 2). Now properly counts
   the closure array length.

3. 0 airport closures is the normal healthy state, but health treated
   it as EMPTY_DATA (CRIT). Added EMPTY_DATA_OK_KEYS set so NOTAM
   closures with 0 records reports OK when the key exists or seed-meta
   is fresh.
2026-03-13 15:59:40 +04:00
..