Module: Sidekiq::Extensions::ActiveRecord
- Defined in:
- lib/sidekiq/extensions/active_record.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
24 25 26 |
# File 'lib/sidekiq/extensions/active_record.rb', line 24 def sidekiq_delay(={}) Proxy.new(DelayedModel, self, ) end |
#sidekiq_delay_for(interval, options = {}) ⇒ Object Also known as: delay_for
27 28 29 |
# File 'lib/sidekiq/extensions/active_record.rb', line 27 def sidekiq_delay_for(interval, ={}) Proxy.new(DelayedModel, self, .merge('at' => Time.now.to_f + interval.to_f)) end |
#sidekiq_delay_until(timestamp, options = {}) ⇒ Object Also known as: delay_until
30 31 32 |
# File 'lib/sidekiq/extensions/active_record.rb', line 30 def sidekiq_delay_until(, ={}) Proxy.new(DelayedModel, self, .merge('at' => .to_f)) end |