Skip to content
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

after_unlock callback is not executed when using until_and_while_executing #678

Open
ishields opened this issue Jan 16, 2022 · 0 comments
Open

Comments

@ishields
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant