chore(cron): drop tripwire ingest to hourly, build-stats to daily#36
Merged
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Neon compute on the func.lol DB was pinned at ~24h/day on the Launch plan because
tripwire-ingestran every 5 minutes — exactly the auto-suspend window — so the compute never had a chance to idle out.tripwire-ingest:*/5 * * * *→0 * * * *tripwire-build-stats:*/15 * * * *→0 4 * * *(1h after the daily ASN refresh, so it always sees the fresh mmdb)tripwire-asn-update: unchangedThe hourly cadence is safe because
INGEST_WINDOW_DAYS = 2insrc/lib/tripwire/ingest.ts— the lookback is window-based, not interval-based. Two UTC days leaves ~47h of slack against a cron outage. Comment updated to reflect hourly instead of 5-min.Expected effect: DB compute drops from ~24h/day to seconds × 24 hourly runs + one daily build-stats run, comfortably inside the 5-min auto-suspend at 0.25 vCPU.