[integrations] apscheduler - driver - #212
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
ricardo-agz
force-pushed
the
ricardo/aps-1-driver
branch
from
July 31, 2026 21:37
9d54dfa to
345fe35
Compare
ricardo-agz
force-pushed
the
ricardo/aps-1-driver
branch
from
July 31, 2026 22:37
345fe35 to
87ec83c
Compare
Introduce the vercel-apscheduler package with its Redis-backed state machine: one atomically fenced generation/sequence wake chain per deployment and scheduler, with typed finish outcomes (advanced, fenced, lost), an active-owner lease, dormancy when nothing is scheduled, and stable Queue payloads. The APScheduler adapter that publishes and consumes wake messages lands separately.
redis-py's dotted self-imports cannot be rewritten for namespace vendoring, and applications import redis directly to configure the job store's connection pool, so the bundle keeps the ordinary bounded dependency instead of vendoring it.
ricardo-agz
force-pushed
the
ricardo/aps-1-driver
branch
from
August 3, 2026 20:57
87ec83c to
2b73b26
Compare
ricardo-agz
marked this pull request as ready for review
August 4, 2026 17:14
The driver's Lua state-machine tests skip without APSCHEDULER_TEST_REDIS_URL, so CI was only exercising the payload and time helpers. Add a Redis service and point the tests at it.
nsidnev
approved these changes
Aug 4, 2026
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.
Bottom of the APScheduler stack. One Redis hash per deployment and scheduler, updated only through Lua scripts, guarantees a single chain of wake messages:
Each wake must claim the current token (generation + sequence) before doing work, and finishing reserves exactly one successor. That one rule is what makes everything safe:
start()converges on one generation.pause()fences it;resume()starts a new one, so stale messages can never run.pendingtoken that the next delivery repairs.No APScheduler code here; the adapter is the next PR.
SCHEDULER.mdhas the full state machine and race table. Tests run the real Lua against a disposable Redis (APSCHEDULER_TEST_REDIS_URL).Also:
redisbecomes an external bundle dependency (it can't be namespace-vendored, and apps import it directly anyway).