-
Notifications
You must be signed in to change notification settings - Fork 235
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
feat(bullmq): support prioritized job state #662
Conversation
Created patch file for patch-package.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as bullmq v3 does have this new state and if someone click on prioritized page from previous version, an error page will be shown. So or we treat this change as a breaking change or handle a way to check bullmq version to conditionally show this new state
@@ -87,6 +87,7 @@ const Helpers = { | |||
'delayed', | |||
'paused', | |||
'waiting-children', | |||
'prioritized', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please move it after waiting state
I am unable to replicate in my testing. Do you happen to have a screenshot of the error? There shouldn't be any clickable link returned from I made the |
|
ok, I tried the last approach, but I prefer the ordering that was before and by adding prioritized state, I think it should appear in this order, people usually may look first for waiting states (waiting/prioritized), then active, completed and failed
So for adding prioritized I may consider it as a breaking change in order to preserve this order and not confuse people using bullmq v3 with a broken page |
Sorry, I am a little confused as to what you want me to do? Doesn't the order in the latest commit, match what you are requesting? Also there shouldn't be a 404 because it isn't returned from |
hi @patrickheeney, I meant that the order is not respected with your last change, that was the purpose of BULLMQ_STATES to keep keep that order on our table |
@roggervalf Sorry, I am still trying to understand. You mentioned this about the order: And this is the order of the last change: Doesn't this match what you are suggesting? If not, can you please list them how you want it to be? |
@@ -18,8 +18,6 @@ async function handler(req, res) { | |||
if (queue.IS_BEE) { | |||
jobCounts = await queue.checkHealth(); | |||
delete jobCounts.newestJob; | |||
} else if (queue.IS_BULLMQ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, but after removing these lines the order changed
I'll fix it in another pr no worries |
🎉 This PR is included in version 4.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Changes Made
Added additional JobState recently introduced.
Reference: https://docs.bullmq.io/guide/jobs/prioritized
Reference: https://bullmq.io/news/062123/faster-priority-jobs/
Potential Risks
Tested on older bullmq and it ignores the prioritized state since it doesn't exist.
Test Plan
Checklist