Module: ActiveJob::Performs::Waiting
- Defined in:
- lib/active_job/performs.rb
Instance Attribute Summary collapse
-
#wait ⇒ Object
Returns the value of attribute wait.
-
#wait_until ⇒ Object
Returns the value of attribute wait_until.
Instance Method Summary collapse
Instance Attribute Details
#wait ⇒ Object
Returns the value of attribute wait.
8 9 10 |
# File 'lib/active_job/performs.rb', line 8 def wait @wait end |
#wait_until ⇒ Object
Returns the value of attribute wait_until.
8 9 10 |
# File 'lib/active_job/performs.rb', line 8 def wait_until @wait_until end |
Instance Method Details
#scoped_by_wait(record) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/active_job/performs.rb', line 18 def scoped_by_wait(record) if waits = { wait: wait&.call(record), wait_until: wait_until&.call(record) }.compact and waits.any? set(waits) else self end end |