Module: Sidekiq::ScheduledSet::UniqueExtension3_0
- Included in:
- Sidekiq::ScheduledSet
- Defined in:
- lib/sidekiq_unique_jobs/sidekiq_unique_ext.rb
Overview
rubocop:disable Style/ClassAndModuleCamelCase
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
42 43 44 45 46 47 48 |
# File 'lib/sidekiq_unique_jobs/sidekiq_unique_ext.rb', line 42 def self.included(base) base.class_eval do include UnlockMethod alias_method :delete_orig, :delete alias_method :delete, :delete_ext end end |
Instance Method Details
#delete_ext(score, jid = nil) ⇒ Object
50 51 52 53 |
# File 'lib/sidekiq_unique_jobs/sidekiq_unique_ext.rb', line 50 def delete_ext(score, jid = nil) item = find_job(jid) unlock(item) if delete_orig(score, jid) end |
#remove_job_ext ⇒ Object
55 56 57 58 59 60 |
# File 'lib/sidekiq_unique_jobs/sidekiq_unique_ext.rb', line 55 def remove_job_ext remove_job_orig do || unlock(Sidekiq.load_json()) yield end end |