feat: job worker#12
Conversation
|
Warning Review limit reached
More reviews will be available in 18 minutes and 37 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
How to use the Graphite Merge QueueAdd the label add-to-gt-merge-queue to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has required the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
0c789dd to
5394dcd
Compare
5394dcd to
dd7e272
Compare
dd7e272 to
53af639
Compare
507a496 to
39bfec0
Compare
53af639 to
a40555c
Compare
36417ae to
1ca936e
Compare
c1bf38c to
c362373
Compare
c362373 to
a0063c9
Compare
6b0d7fe to
c7c1f85
Compare
a0063c9 to
f098223
Compare
c6e93a6 to
ad765a5
Compare
f098223 to
712b2a1
Compare
712b2a1 to
f011eab
Compare
01e5055 to
a0a4629
Compare
38705c3 to
da9be17
Compare
da9be17 to
dedce5f
Compare

Motivation
ADR-0001 lifts a supervised job-execution stack into event-sorcery. With the
Jobtrait in place (#11), the next layer is the worker side: the storagehandle, retry/backoff policy, the apalis handler, and the fault-injection
harness that end-to-end tests need.
Solution
JobBackend<J>— worker-side handle over apalis'sJobstable, built once atstartup, yielding the apalis
Storage<J>for worker registration.work<J>apalis handler (production + test-support variants) thatdeserializes, logs, and runs
performagainst the injectedInput.ExponentialBackoff(1s base, doubling, 30s cap) +RETRY_BACKOFF;FAIL_STOP_RECOVERY_TIMEOUTkeeps a tripped circuit breakeropen until a human-supervised restart.
on_terminal_failurestops the worker and notifies the supervisor whenretries exhaust;
JobErrormodels a failed or injected job.FailureInjector(test-support) arms aJob::KINDso the next instance failsterminally and sticks to that
Labelacross retries while others run.build_poll_configtunes a 100ms poll interval with backoff for sub-secondpickup.
Closes RAI-915.