Module: Sidekiq::Extensions::ActiveRecord
- Defined in:
- lib/sidekiq/extensions/active_record.rb
Instance Method Summary collapse
- #delay(options = {}) ⇒ Object
- #delay_for(interval, options = {}) ⇒ Object
- #delay_until(timestamp, options = {}) ⇒ Object
Instance Method Details
#delay(options = {}) ⇒ Object
24 25 26 |
# File 'lib/sidekiq/extensions/active_record.rb', line 24 def delay(={}) Proxy.new(DelayedModel, self, ) end |
#delay_for(interval, options = {}) ⇒ Object
27 28 29 |
# File 'lib/sidekiq/extensions/active_record.rb', line 27 def delay_for(interval, ={}) Proxy.new(DelayedModel, self, .merge('at' => Time.now.to_f + interval.to_f)) end |
#delay_until(timestamp, options = {}) ⇒ Object
30 31 32 |
# File 'lib/sidekiq/extensions/active_record.rb', line 30 def delay_until(, ={}) Proxy.new(DelayedModel, self, .merge('at' => .to_f)) end |