Module: Sidekiq::ScheduledSet::UniqueExtension3_4

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



64
65
66
67
68
69
70
# File 'lib/sidekiq_unique_jobs/sidekiq_unique_ext.rb', line 64

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_extObject



72
73
74
# File 'lib/sidekiq_unique_jobs/sidekiq_unique_ext.rb', line 72

def delete_ext
  unlock(item) if delete_orig
end

#remove_job_extObject



76
77
78
79
80
81
# File 'lib/sidekiq_unique_jobs/sidekiq_unique_ext.rb', line 76

def remove_job_ext
  remove_job_orig do |message|
    unlock(Sidekiq.load_json(message))
    yield message
  end
end