Module: Sidekiq::ScheduledSet::UniqueExtension
- Included in:
- Sidekiq::ScheduledSet
- Defined in:
- lib/sidekiq_unique_jobs/sidekiq_unique_ext.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
37 38 39 40 41 42 43 |
# File 'lib/sidekiq_unique_jobs/sidekiq_unique_ext.rb', line 37 def self.included(base) base.class_eval do include SidekiqUniqueJobs::Unlockable alias_method :delete_orig, :delete alias_method :delete, :delete_ext end end |
Instance Method Details
#delete_ext ⇒ Object
45 46 47 |
# File 'lib/sidekiq_unique_jobs/sidekiq_unique_ext.rb', line 45 def delete_ext SidekiqUniqueJobs::Unlockable.unlock(item) if delete_orig end |
#remove_job_ext ⇒ Object
49 50 51 52 53 54 |
# File 'lib/sidekiq_unique_jobs/sidekiq_unique_ext.rb', line 49 def remove_job_ext remove_job_orig do || SidekiqUniqueJobs::Unlockable.unlock(Sidekiq.load_json()) yield end end |