goo
goo

Reputation: 2280

Rails: Resque parellel queues

I have multiple jobs running in multiple queues with Resque. My problem is that when one queue is running lots of jobs, it holds up my other queues.

How can I get Resque to run parallel queues but still limit each queue to one job at a time?

Upvotes: 0

Views: 128

Answers (1)

matteo
matteo

Reputation: 2256

You can launch different workers for each of your queue.

In order to do this you have to specify the name of the queue to process on the QUEUE env variable.

So if you have 3 queues you'd do the following:

  • QUEUE=queue1 bundle exec rake resque:work
  • QUEUE=queue2 bundle exec rake resque:work
  • QUEUE=queue3 bundle exec rake resque:work

Upvotes: 1

Related Questions