fix(seeds): remove military-bases from static-ref bundle (#2893)

* fix(seeds): remove military-bases from static-ref bundle

seed-military-bases.mjs is a one-time batch upload tool requiring
--env and --sha CLI args. Without args it exits code 1. It writes
no seed-meta so the freshness gate always tries to run it, always
fails, causing the bundle to exit non-zero.

* fix(notifications): wrap Telegram/Slack/Discord sends in try/catch

Unhandled fetch timeout (ETIMEDOUT) in sendTelegram crashed the entire
digest cron run. Email delivery succeeded but subsequent Telegram
delivery threw an uncaught error, killing the process.

Wrapped all three webhook-style send functions (Telegram, Slack, Discord)
in try/catch so network timeouts log a warning and return false instead
of crashing. sendEmail already had this pattern.
This commit is contained in:
Elie Habib
2026-04-10 14:10:30 +04:00
committed by GitHub
parent 6d923108d8
commit d85bee163e
2 changed files with 61 additions and 47 deletions

View File

@@ -4,5 +4,4 @@ import { runBundle, DAY, WEEK } from './_bundle-runner.mjs';
await runBundle('static-ref', [
{ label: 'Submarine-Cables', script: 'seed-submarine-cables.mjs', seedMetaKey: 'infrastructure:submarine-cables', intervalMs: WEEK, timeoutMs: 300_000 },
{ label: 'Chokepoint-Baselines', script: 'seed-chokepoint-baselines.mjs', seedMetaKey: 'energy:chokepoint-baselines', intervalMs: 400 * DAY, timeoutMs: 60_000 },
{ label: 'Military-Bases', script: 'seed-military-bases.mjs', seedMetaKey: 'military:bases', intervalMs: 30 * DAY, timeoutMs: 120_000 },
]);