Fayez Bast
|
b2bae30bd8
|
Add climate news seed and ListClimateNews RPC (#2532)
* Add climate news seed and ListClimateNews RPC
* Wire climate news into bootstrap and fix generated climate stubs
* fix(climate): align seed health interval and parse Atom entries per feed
* fix(climate-news): TTL 90min, retry timer on failure, named cache key constant
- CACHE_TTL: 1800 to 5400 (90min = 3x 30-min relay interval, gold standard)
- ais-relay: add 20-min retry timer on subprocess failure; clear on success
- cache-keys.ts: export CLIMATE_NEWS_KEY named constant
- list-climate-news.ts: import CLIMATE_NEWS_KEY instead of hard-coding string
---------
Co-authored-by: Elie Habib <elie.habib@gmail.com>
|
2026-04-02 08:55:22 +04:00 |
|
Elie Habib
|
78a14306d9
|
feat: add seed-first pattern to 15 RPC handlers with Railway seed scripts (#989)
Migrate handlers from direct external API calls to seed-first pattern:
Railway cron seeds Redis → handlers read from Redis → fallback to live
fetch if seed stale and SEED_FALLBACK_* env enabled.
Handlers updated: earthquakes, fire-detections, internet-outages,
climate-anomalies, unrest-events, cyber-threats, market-quotes,
commodity-quotes, crypto-quotes, etf-flows, gulf-quotes,
stablecoin-markets, natural-events, displacement-summary, risk-scores.
Also adds:
- scripts/_seed-utils.mjs (shared seed framework with atomic publish,
distributed locks, retry, freshness metadata)
- 13 seed scripts for Railway cron
- api/seed-health.js monitoring endpoint
- scripts/validate-seed-migration.mjs post-deploy validation
- Restored multi-source CII in get-risk-scores (8 sources: ACLED,
UCDP, outages, climate, cyber, fires, GPS, Iran)
|
2026-03-04 17:37:15 +04:00 |
|