Module: Sidekiq::Extensions::Klass

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

Instance Method Summary collapse

Instance Method Details

#delay(options = {}) ⇒ Object


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

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

#delay_for(interval, options = {}) ⇒ Object


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

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

#delay_until(timestamp, options = {}) ⇒ Object


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

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