From 1fd6b736a0cbeb2c2d6ab337b48b689f8613f516 Mon Sep 17 00:00:00 2001 From: Nathan Toups Date: Thu, 21 May 2026 06:34:35 -0600 Subject: [PATCH] chore(cron): drop tripwire ingest to hourly, build-stats to daily MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Neon compute on the func.lol DB was pinned at ~24h/day because the ingest cron fired every 5 minutes — exactly the auto-suspend window. Ingest only inserts into tripwire_events, and the lookback is INGEST_WINDOW_DAYS (2), so the cadence is independent of the window. Build-stats runs once daily at 04:00 UTC, an hour after the ASN refresh so it always reads the freshest mmdb. --- src/lib/tripwire/ingest.ts | 4 ++-- vercel.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/tripwire/ingest.ts b/src/lib/tripwire/ingest.ts index d1bf0d6..f309a5c 100644 --- a/src/lib/tripwire/ingest.ts +++ b/src/lib/tripwire/ingest.ts @@ -90,8 +90,8 @@ async function listBlobsPage(prefix: string, cursor: string | undefined): Promis } // Bound the listing to the trailing INGEST_WINDOW_DAYS UTC dates. Cron runs -// every 5 minutes, so a 2-day window leaves 24h+ of slack against any cron -// outage. Events older than the window won't be auto-ingested by the cron; +// hourly, so a 2-day window leaves ~47h of slack against any cron outage. +// Events older than the window won't be auto-ingested by the cron; // the CLI script (scripts/tripwire/ingest-events.ts) still walks the full // events/ prefix and can backfill manually if a longer outage happens. const INGEST_WINDOW_DAYS = 2 diff --git a/vercel.json b/vercel.json index 986ccf8..96835f4 100644 --- a/vercel.json +++ b/vercel.json @@ -4,11 +4,11 @@ "crons": [ { "path": "/api/cron/tripwire-ingest", - "schedule": "*/5 * * * *" + "schedule": "0 * * * *" }, { "path": "/api/cron/tripwire-build-stats", - "schedule": "*/15 * * * *" + "schedule": "0 4 * * *" }, { "path": "/api/cron/tripwire-asn-update",