Module: Sidekiq::SortedEntry::UniqueExtension

Included in:
Sidekiq::SortedEntry
Defined in:
lib/sidekiq_unique_jobs/sidekiq_unique_ext.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object


8
9
10
11
12
13
14
15
# File 'lib/sidekiq_unique_jobs/sidekiq_unique_ext.rb', line 8

def self.included(base)
  base.class_eval do
    alias_method :delete_orig, :delete
    alias_method :delete, :delete_ext
    alias_method :remove_job_orig, :remove_job
    alias_method :remove_job, :remove_job_ext
  end
end

Instance Method Details

#delete_extObject


17
18
19
# File 'lib/sidekiq_unique_jobs/sidekiq_unique_ext.rb', line 17

def delete_ext
  SidekiqUniqueJobs::Unlockable.unlock(item) if delete_orig
end