-
Notifications
You must be signed in to change notification settings - Fork 436
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
fix(job-scheduler): validate if next delayed job exists #3015
base: master
Are you sure you want to change the base?
Conversation
de2a4b3
to
f251f8b
Compare
94f37ff
to
5e9015a
Compare
removeJob(delayedJobId, true, prefixKey, true --[[remove debounce key]]) | ||
rcall("ZREM", delayedKey, delayedJobId) | ||
if rcall("ZSCORE", delayedKey, prevDelayedJobId) ~= false then | ||
removeJob(prevDelayedJobId, true, prefixKey, true --[[remove debounce key]]) |
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.
Instead of removing the job here and then adding a new one, couldn't we just set a flag here and if true not add the job again?
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.
the problem is that if the delayed is not regenerated with new repeat opts, next delayed job will be scheduled with old repeat options. This is happening in that way because we use opts from current delayed job to schedule the next one.
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.
Ok, can you write a comment then to explain why it is needed so we not need to remember it next time? :)
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.
sure, I'll add a description about it
Why
How
Enter the implementation details here.
Additional Notes (Optional)
Any extra info here.