Module: Sidekiq::Extensions::Klass
- Defined in:
- lib/sidekiq/extensions/class_methods.rb
Instance Method Summary collapse
- #sidekiq_delay(options = {}) ⇒ Object (also: #delay)
- #sidekiq_delay_for(interval, options = {}) ⇒ Object (also: #delay_for)
- #sidekiq_delay_until(timestamp, options = {}) ⇒ Object (also: #delay_until)
Instance Method Details
#sidekiq_delay(options = {}) ⇒ Object Also known as: delay
22 23 24 |
# File 'lib/sidekiq/extensions/class_methods.rb', line 22 def sidekiq_delay(={}) Proxy.new(DelayedClass, self, ) end |
#sidekiq_delay_for(interval, options = {}) ⇒ Object Also known as: delay_for
25 26 27 |
# File 'lib/sidekiq/extensions/class_methods.rb', line 25 def sidekiq_delay_for(interval, ={}) Proxy.new(DelayedClass, self, .merge('at' => Time.now.to_f + interval.to_f)) end |
#sidekiq_delay_until(timestamp, options = {}) ⇒ Object Also known as: delay_until
28 29 30 |
# File 'lib/sidekiq/extensions/class_methods.rb', line 28 def sidekiq_delay_until(, ={}) Proxy.new(DelayedClass, self, .merge('at' => .to_f)) end |