sidekiq-unique-jobs
sidekiq-unique-jobs copied to clipboard
after_unlock callback is not executed when using until_and_while_executing
Describe the bug It seems as though the after_unlock_callback is never called when using the until_and_while_executing callback. The callback works as expected when using :until_executed
Expected behavior I expect the callback to fire when the lock is released (after execution)
Current behavior Callback does not fire.
Worker class
class TestWorker < BaseSidekiqWorker
sidekiq_options queue: :high, retry: 0
sidekiq_options lock: :until_and_while_executing, on_conflict: :reject
def perform
puts 'Running'
puts 'Done'
return
end
def after_unlock(item = nil)
# called
puts "Performing again in 25 seconds"
self.class.perform_in(25.seconds, true)
end
end
Additional context sidekiq-unique-jobs (7.1.12)