Repository navigation
Alert when listing syncs stop - #11
Merged
Merged
Conversation
/api/health now reports when the newest listing was last seen by a sync and whether that is within 36 hours. The daily production smoke test fails when it isn't, so a broken sync (like the rotated Apify key since 31 Oct) shows up as a red run instead of going unnoticed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013WE1CRNEjYzBMwwwxsUHiz
|
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.
Why
No listings have synced since 31 Oct. Apify rejects the key with a 401 (the key was rotated, but the
APIFY_API_TOKENEdge Function secret still has the old one). Nothing alerted on it: the cron jobs report "succeeded" once the request is sent, and/api/healthsaid ok.What
/api/healthaddslistings: { last_seen, hours_ago, fresh }, wherefreshmeans the newest listing was seen by a sync within 36h (syncs run every 12h).statusstaysok, so liveness checks are unaffected. The lookup never throws.freshis false. The daily production smoke run turns red when syncs break.Expect
The smoke run on
mainwill fail after merge until the Apify key is updated in Supabase. That is the intended alert.Checks
Generated by Claude Code