-
Notifications
You must be signed in to change notification settings - Fork 417
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
[Bug]: changePriority Confusing behavior when updating priorities #2801
Comments
hi @LianZiZhou opts is expected to be changed. The only change that matters is priority attribute |
Thanks for your reply. What is very confusing to me is that in my test opts cannot be changed anyway. When should opts be updated? |
@roggervalf it is interesting that there is no priority field for the Job class either, so it is actually not possible to know the priority of a job after it has been changed with changePriority, even though we know it works based on the tests. |
Maybe need priority field for the Job class? Read priority directly instead of If I didn't understand this problem, I might only be able to read the raw value from Redis to reliably get the current priority of the Job. |
oh yeah I was thinking that we were handling priority as delay attribute, but this is not the case. I'll work on adding this field in Job class |
Version
latest
Platform
NodeJS
What happened?
When I look up the raw Redis key, I got this
bull:generate:1 => {b'timestamp': b'1728168935500', b'priority': b'2097045', b'delay': b'0', b'name': b'1', b'opts': b'{"removeOnComplete":1000,"removeOnFail":5000,"priority":2097052,"delay":0,"attempts":0}', b'data': b'{"id":"1"}'}
.The
priority
has been updated, butopts.priority
has not. It looks like the priority update is working, but the results are confusing.I don't know if this is expected behavior and will the priority change really make that task be picked earlier?How to reproduce.
No response
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: