Search code examples
resque

is there a way to en-queue the same job to different queues?


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?


Solution

  • To anyone who might stumble on this, here's what I was looking for:

    Resque.enqueue_to(queue, class_name, *params)