-
-
Notifications
You must be signed in to change notification settings - Fork 279
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
Scheduled jobs are not unlocked when deleted #97
Comments
Why? Sorted set inherits from |
Yes, but |
It just calls parent.delete which is jobset and already taken care of. Didn't mean to close it just yet :) |
Have a failing test for it? |
|
No sorry, no test, I just stumbled on the problem. |
Sorry, no time for creating a proper test, but you can see it failing with this code: class UniqueWorker
include Sidekiq::Worker
sidekiq_options unique: true
def perform
puts "Performing unique job"
end
end
UniqueWorker.perform_in(1.hour)
=> "545161da8c5640bb088ac0f5"
Sidekiq::ScheduledSet.new.count
=> 1
Sidekiq.redis {|conn| conn.keys 'sidekiq_unique*' }
=> ["sidekiq_unique:274be02062ac878719e069e2b804e761"]
Sidekiq::ScheduledSet.new.each(&:delete)
=> nil
Sidekiq::ScheduledSet.new.count
=> 0
Sidekiq.redis {|conn| conn.keys 'sidekiq_unique*' }
=> ["sidekiq_unique:274be02062ac878719e069e2b804e761"]
UniqueWorker.perform_in(1.hour)
=> nil
Sidekiq::ScheduledSet.new.count
=> 0 After delete, there should be no locks. Updated with more test data |
@mhenrixon I can reproduce this. The notable part is that there are two types of I have opened a tangential issue: sidekiq/sidekiq#2472 |
I have now this hack in extensions to make scheduled jobs work. However, the scheduled polling has no way to hook other than redefining the whole method 😞 https://gist.github.com/frsantos/e7e765874eb396e1abb6 |
I think an extension is missing for
Sidekiq::SortedEntry
in sidekiq_unique_ext.rb file.The text was updated successfully, but these errors were encountered: