Using Heroku and Resque in different applications


My goal is to have a main app adding jobs to a Resque queue on Heroku. However, I want the workers to be run in different apps.

Can I enqueue a job in an app to be performed by other app(worker)? Is there any tutorial explaining how to do it?


Resque is going to use whatever Redis instance you point it at. In Heroku, that's probably going to be an instance from the separate service Redis To Go. You just need to write your Resque setup code to point to the common Redis instance.


uri = URI.parse(ENV["REDISTOGO_URL"])
Resque.redis = =>, :port => uri.port, :password => uri.password)

This will initialize Resque with the environment variable, which you can set in each deployed Heroku app using heroku config:add REDISTOGO=etc.