-
-
Notifications
You must be signed in to change notification settings - Fork 272
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
A worker with "While Executing" lock and "Reschedule" strategy is rescheduled forever #457
Labels
Comments
Which version of the gem are you using @bunyan? |
@mhenrixon, |
I'll get it fixed right away @bunyan |
Will be fixed in beta7 @bunyan. Should be released in 10 minutes or so |
Great, thank you @mhenrixon! |
Try the new version, now I also have a regression test for it! |
Works fine now with the beta7 👍🏻 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
A worker with
lock: :while_executing
andon_conflict: :reschedule
is being rescheduled in a loop after completion.Expected behavior
Usual Sidekiq worker behaviour, i.e. job being removed from queue after execution.
Current behavior
"Reschedule" strategy runs after the worker code is executed scheduling it to be run again 5 seconds after completion.
Worker class
Additional context
I believe the problem is here - whether the strategy will be called or not relies on the result of the
callback_safely
which by default returns nil. If I add a callback to the worker class likeeverything works as expected.
The text was updated successfully, but these errors were encountered: