-
Notifications
You must be signed in to change notification settings - Fork 1
Add support for SQS Fair Queues #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 2.x.x #17 +/- ##
============================================
+ Coverage 68.07% 70.66% +2.58%
- Complexity 132 138 +6
============================================
Files 10 10
Lines 473 484 +11
============================================
+ Hits 322 342 +20
+ Misses 151 142 -9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Would this not be more flexible by adding |
|
one way could add JobGroupableInterface and then extend |
That still would not solve the issues with DbScheduler as unless it's in the job's body it won't get stored. Unless we are happy to not support fair queues for jobs which get stored to DB, which is currently any job with a delay over 5 minutes in our setup. |
This PR adds support for automatically setting
MessageGroupIdbased a property of the job's body.It will try to use
$groupIdas either an array key (if the body is an array) or as an object property name (if it's an object) and fallback to not setting a group Id when not set or the body is not an object/array.To maintain backwards compatibility, if
$groupIdis not set on the jobqueue the check never takes place and noMessageGroupIdis passed.This change allows for AWS SQS fair queues to automatically prioritize jobs based on which groups they are coming from which can help mitigate issues with noisy neighbors in multi-tenant uses.