From 218addd61d60cbe379d1ee0b6971cfbf081fa1ea Mon Sep 17 00:00:00 2001 From: Elie Habib Date: Sun, 8 Mar 2026 09:29:14 +0400 Subject: [PATCH] fix(health): reduce aviation seed interval to 1h, align maxStaleMin (#1258) --- api/health.js | 2 +- scripts/ais-relay.cjs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/health.js b/api/health.js index 013266bb3..c0d751a72 100644 --- a/api/health.js +++ b/api/health.js @@ -69,7 +69,7 @@ const SEED_META = { gulfQuotes: { key: 'seed-meta:market:gulf-quotes', maxStaleMin: 30 }, stablecoinMarkets:{ key: 'seed-meta:market:stablecoins', maxStaleMin: 60 }, naturalEvents: { key: 'seed-meta:natural:events', maxStaleMin: 120 }, - flightDelays: { key: 'seed-meta:aviation:faa', maxStaleMin: 30 }, + flightDelays: { key: 'seed-meta:aviation:faa', maxStaleMin: 90 }, predictions: { key: 'seed-meta:prediction:markets', maxStaleMin: 15 }, insights: { key: 'seed-meta:news:insights', maxStaleMin: 30 }, marketQuotes: { key: 'seed-meta:market:stocks', maxStaleMin: 30 }, diff --git a/scripts/ais-relay.cjs b/scripts/ais-relay.cjs index 186c388d5..c8ee14763 100644 --- a/scripts/ais-relay.cjs +++ b/scripts/ais-relay.cjs @@ -1444,7 +1444,7 @@ async function startMarketDataSeedLoop() { // so Vercel handler serves from cache (avoids 114 API calls per miss) // ───────────────────────────────────────────────────────────── const AVIATIONSTACK_API_KEY = process.env.AVIATIONSTACK_API || ''; -const AVIATION_SEED_INTERVAL_MS = 2 * 60 * 60 * 1000; // 2h +const AVIATION_SEED_INTERVAL_MS = 1 * 60 * 60 * 1000; // 1h const AVIATION_SEED_TTL = 14400; // 4h — survives 1 missed cycle const AVIATION_REDIS_KEY = 'aviation:delays:intl:v3'; const AVIATION_BATCH_CONCURRENCY = 10;