mirror of
https://github.com/koala73/worldmonitor.git
synced 2026-04-25 17:14:57 +02:00
fix(health): enforce 1h+ TTL buffer across all seed jobs (#2072)
Full audit of seed TTL vs cron cadence. Rule: TTL >= cron_interval + 1h. CRITICAL (TTL = cron, 0 buffer): - seed-supply-chain-trade: tariffTrendsUs TRADE_TTL(6h) → TARIFF_TTL(8h) - seed-supply-chain-trade: customsRevenue TRADE_TTL(6h) → CUSTOMS_TTL(24h) - seed-sanctions-pressure: CACHE_TTL 12h → 15h (12h cron, 3h buffer) - seed-usa-spending: CACHE_TTL 1h → 2h (1h cron, 1h buffer) WARN (<1h buffer): - seed-security-advisories: TTL 2h → 3h (1h cron, now 2h buffer) - seed-token-panels: TTL 1h → 90min (30min cron, now 1h buffer) - seed-etf-flows: TTL 1h → 90min (15min cron, now 75min buffer) - seed-stablecoin-markets: TTL 1h → 90min (10min cron, now 80min buffer) - seed-gulf-quotes: TTL 1h → 90min (10min cron, now 80min buffer) - seed-crypto-quotes: TTL 1h → 2h (5min cron, now 115min buffer) - ais-relay CRYPTO_SEED_TTL: 1h → 2h - ais-relay STABLECOIN_SEED_TTL: 1h → 2h - ais-relay SECTORS_SEED_TTL: 1h → 2h
This commit is contained in:
@@ -12,7 +12,7 @@ loadEnvFile(import.meta.url);
|
||||
|
||||
const CANONICAL_KEY = 'sanctions:pressure:v1';
|
||||
const STATE_KEY = 'sanctions:pressure:state:v1';
|
||||
const CACHE_TTL = 12 * 60 * 60;
|
||||
const CACHE_TTL = 15 * 60 * 60; // 15h — 3h buffer over 12h cron cadence (was 12h = 0 buffer)
|
||||
const DEFAULT_RECENT_LIMIT = 60;
|
||||
const OFAC_TIMEOUT_MS = 45_000;
|
||||
const PROGRAM_CODE_RE = /^[A-Z0-9][A-Z0-9-]{1,24}$/;
|
||||
|
||||
Reference in New Issue
Block a user