perf(worker): do fetch next job in same finished roundtrip [rust] - #4277
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Rust worker execution loop to take advantage of BullMQ’s moveToFinished “fetch next job” capability, reducing per-job Redis roundtrips by chaining directly into the next job when available. It also ensures worker-level rate limiting remains enforced when chaining by including limiter options in the packed moveToFinished opts.
Changes:
- Add
limitertomoveToFinishedpacked options sofetchNexthonors rate limiting. - Allow
move_to_finished_fast/ job completion & failure handlers to return an optionally fetched nextJob. - Update the worker loop to process chained jobs in a tight loop using the same token, avoiding extra
moveToActivecalls.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
🎉 This PR is included in version 1.0.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 5.80.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 2.25.4 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Port Impact Checklist
Why
Enter your explanation here.
How
Enter the implementation details here.
Additional Notes (Optional)
Any extra info here.