Class: Resque::Staggered
- Inherits:
-
Object
- Object
- Resque::Staggered
- Defined in:
- lib/resque/staggered.rb
Instance Method Summary collapse
-
#enqueue(klass, *args) ⇒ void
Enqueues a job with the given arguments at a staggered time.
-
#initialize(**options) ⇒ Staggered
constructor
Initializes a new Staggered object.
Constructor Details
#initialize(**options) ⇒ Staggered
Initializes a new Staggered object.
14 15 16 |
# File 'lib/resque/staggered.rb', line 14 def initialize(**) @options = end |
Instance Method Details
#enqueue(klass, *args) ⇒ void
This method returns an undefined value.
Enqueues a job with the given arguments at a staggered time.
24 25 26 27 28 29 30 |
# File 'lib/resque/staggered.rb', line 24 def enqueue(klass, *args) if queue.present? ::Resque.enqueue_at_with_queue(queue, current_enqueue_at, klass, *args) else ::Resque.enqueue_at(current_enqueue_at, klass, *args) end end |