feat: add build_supervised_worker macro#13
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. |
6f3cb50 to
b90148c
Compare
9d7e5dd to
507a496
Compare
b90148c to
d69d09d
Compare
d69d09d to
446da0d
Compare
446da0d to
939af23
Compare
939af23 to
7d88999
Compare
7d88999 to
aaae2e8
Compare
aaae2e8 to
bc2b9f3
Compare
bc2b9f3 to
e8e1064
Compare
6b0d7fe to
c7c1f85
Compare
e8e1064 to
7838dd1
Compare
7838dd1 to
3e4bf23
Compare
3e4bf23 to
c17bc1b
Compare
c17bc1b to
71eb78f
Compare
01e5055 to
a0a4629
Compare
71eb78f to
96f8f84
Compare
96f8f84 to
dcd2657
Compare
d947c89 to
43fa41e
Compare
dcd2657 to
15949ef
Compare
15949ef to
359f1aa
Compare

Motivation
Every consumer wiring a job worker should get the same concurrency, retry
policy, circuit breaker, and terminal-failure handling without re-deriving it.
ADR-0001 puts that wiring behind a macro in event-sorcery.
Solution
build_supervised_worker!(::<Job>, index, backend, input, fail_stop, failure_notify[, injector])builds aWorkerBuilderwith concurrency 1, 3retries +
RETRY_BACKOFF, a circuit breaker,on_terminal_failure, and thework::<J>handler; undertest-supportit also wires aFailureInjector.{WORKER_NAME}-{index}.MonitorandCircuitBreakerConfig, plus a hidden__apalismodule holding the apalis items the macro expands to, so consumers need no
direct apalis dependency.
Closes RAI-916.