Module: Sidekiq::Extensions::Klass

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

Instance Method Summary collapse

Instance Method Details

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



23
24
25
# File 'lib/sidekiq/extensions/class_methods.rb', line 23

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

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



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

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

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



29
30
31
# File 'lib/sidekiq/extensions/class_methods.rb', line 29

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