To integrate the hero with the workers, you need to complete a rake task called jobs: work. To get this working with resque, you need to add the following task to the rake file (taken from http://blog.redistogo.com/2010/07/26/resque-with-redis-to-go/ ):
require 'resque/tasks' task "resque:setup" => :environment do ENV['QUEUE'] = '*' end desc "Alias for resque:work (To run workers on Heroku)" task "jobs:work" => "resque:work"
To start an individual worker on a hero, use:
? heroku workers 1
To disable background workers, follow these steps:
? heroku workers 0
To use 5 workers, follow these steps:
? heroku workers 5
Geroku blames you for the second for every worker you run. If you enter the hero, you can see how much your current number of employees will cost on the resources page of your application.
source share