Repository navigation
feat: add first due scheduling - #9
Merged
Merged
Conversation
…tes (#7) - Add save_with_first_due() to persist an exact first due time together with matching metadata, definition and an opaque policy fingerprint. - Add update_definition() to update task payloads without moving their stored due time. - Support optional first_run_kwargs for the first outgoing invocation. - Protect managed reservations and definition updates against conflicting - Redis writes, changed state and deletion. - Preserve newer payloads and immediate requests. - Add unit and isolated Redis, Beat and worker integration test
- Add optional jitter settings for Helm and Docker Compose - Calculate stable SHA-256 offsets for recurring WALK and POLL schedules - Preserve fractional timestamps and normal polling intervals - Keep stored next dues unchanged during policy transitions - Apply enable, disable and window changes to the following run - Preserve inventory refresh delays and immediate recovery requests - Recover schedules using existing first-run rules before adopting jitter - Protect managed updates against concurrent writes and schedule replacement - Add regression coverage and document behavior and known limitations - handle concurrent schedule creation safely - Add EntryAlreadyExists to distinguish creation conflicts from invalid input - Assign entry identity only after a successful Redis write - Reuse bounded WATCH retries for first-due creation
gmaiyani
marked this pull request as ready for review
November 18, 2026 07:13
ajasnosz
approved these changes
Nov 24, 2026
Comment on lines
+31
to
33
| # Python 3.9 builds are available for Ubuntu 24.04, not 26.04. | ||
| os: [ubuntu-24.04] | ||
| python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] |
There was a problem hiding this comment.
maybe we can move from python 3.9? it is not supported for long time
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
Add opt-in first-due scheduling and managed entry lifecycle support. Applications can select initial deadlines, update task definitions without shifting existing timing, and apply scheduling-policy changes while preserving pending work.
Changes
First-due scheduling
save_with_first_due()to persist an application-selected first deadline together with the definition, run metadata, policy fingerprint and entry identity.update_definition()to update task payloads without changing their stored deadline or pending immediate-run state.first_run_kwargsfor the first outgoing invocation without modifying recurring task arguments.Lifecycle handling
redbeat_entry_policycallback to adopt, change or remove scheduling policy during reservation. Policy changes affect the following run without moving the invocation already selected.request_run()for delayed or urgent refresh requests. Overlapping requests retain the earliest pending deadline and latest payload.save_guarded()and creation identities to reject stale writes after deletion and recreation under the same key.EntryAlreadyExistswhen concurrent creation finds an existing winning entry.Compatibility and scope
Test coverage