Repository navigation
Admin: check a calendar now - #26
Merged
Merged
Conversation
POST /api/admin/calendars/{id}/check pulls next_check_at forward to now,
so the normal dispatcher runs the check within a second (respecting the
host budget). A calendar with a live lease is mid-check and gets a 409
check_running; an expired lease from a crashed check doesn't block.
The admin calendars page gets a "Check now" button per calendar.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Roadmap item "Add option for admins to refresh a calendar now". No spec.
How it works
POST /api/admin/calendars/{id}/check(admin and 2FA required, like every/api/adminroute) setsnext_check_atto now. The dispatcher already looks for due calendars every second, so a normal check runs right away: same lease, host budget, diffing and notifications. There's no second check path.least(...)).409 check_running; pulling it forward would let a second worker claim it. A lease left over from a crashed check (past its expiry) doesn't block.404 not_found. Success →202.Testing
ApiTests.CheckNowcovers: due later → pulled to now; overdue → unchanged; running → 409 and unchanged; expired lease → allowed; unknown → 404.EveryAdminRouteNeedsAnAdminWithASecondFactorcovers the new route.Not included: a "check all" button, a live-updating status, and an audit log entry.
Closes #29
🤖 Generated with Claude Code