Reputation: 638
Let's say I have a MyJob
class with perform
method, and I want to enqueue it different queues in Resque. How can I achieve it?
The documentation states that job's queue is determined by queue
class method, which means that the only way to enqueue the same class to different queues is to dynamically create a sub-class for each queue, before enqueing.
Is there a simpler way that I'm missing?
Upvotes: 0
Views: 174
Reputation: 638
To anyone who might stumble on this, here's what I was looking for:
Resque.enqueue_to(queue, class_name, *params)
Upvotes: 1
Reputation: 3533
have you tried enqueuing the jobs using:
Resque::Job.create(queue, klass, *args)
Upvotes: 0