Module: Sidekiq::Extensions::ActiveRecord

Defined in:
lib/sidekiq/extensions/active_record.rb

Instance Method Summary collapse

Instance Method Details

#sidekiq_delay(options = {}) ⇒ Object Also known as: delay


26
27
28
# File 'lib/sidekiq/extensions/active_record.rb', line 26

def sidekiq_delay(options = {})
  Proxy.new(DelayedModel, self, options)
end

#sidekiq_delay_for(interval, options = {}) ⇒ Object Also known as: delay_for


30
31
32
# File 'lib/sidekiq/extensions/active_record.rb', line 30

def sidekiq_delay_for(interval, options = {})
  Proxy.new(DelayedModel, self, options.merge("at" => Time.now.to_f + interval.to_f))
end

#sidekiq_delay_until(timestamp, options = {}) ⇒ Object Also known as: delay_until


34
35
36
# File 'lib/sidekiq/extensions/active_record.rb', line 34

def sidekiq_delay_until(timestamp, options = {})
  Proxy.new(DelayedModel, self, options.merge("at" => timestamp.to_f))
end