Method: Kthxbye#enqueue
- Defined in:
- lib/kthxbye.rb
#enqueue(queue, klass, *args) ⇒ Object
Queues jobs. Takes at minimum two paramters
1) A string representing a queue
2) The class of the job being queued.
You can optionally pass in additional params to the perform method within the class. You will need to match the number of args in the perform method when you queue the job. Otherwise this will throw an exception.
92 93 94 |
# File 'lib/kthxbye.rb', line 92 def enqueue(queue, klass, *args) Job.create(queue, klass, *args) end |