1

I have a question. I am using resque on heroku. There are 5 workers and 5 queues. Now, Can I run specific queue(lets say queue4) on specific worker(let's say worker 1).

2 Answers 2

1

No, you cannot. Resque requires that you set the QUEUE in an environment variable (or in the .resque file at the top of your project).
You cannot, on heroku, have different environment variables depending of a dyno.

What you can do, though, is the following, in your Procfile :

urgent: QUEUE=urgent rake environment resque:work
low: QUEUE=low rake environment resque:work

You will get two different workers and can scale them both separately depending of your needs.
They will both run similarly, but have different environment variables use different queues.

0

if you use delayed_job this works

in Procfile.

worker_l: bundle exec rake jobs:work QUEUE=worker_l worker_m: bundle exec rake jobs:work QUEUE=worker_m worker_h: bundle exec rake jobs:work QUEUE=worker_h worker_u: bundle exec rake jobs:work QUEUE=worker_u

and then

handle_asynchronously :do_it, :queue => 'worker_h'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.