Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tag: 0.1.0
Fetching contributors…

Cannot retrieve contributors at this time

29 lines (16 sloc) 971 Bytes

Resque Heroku Autoscaler

A Resque plugin. Requires Resque 1.8 and the Heroku gem (I only testet with 1.11.0).

This gem scales your Heroku workers according to the number of pending Resque jobs. The original idea comes from Daniel Huckstep's blog post on the topic

Just extend your job class with esque::Plugins::HerokuAutoscaler.

For example:

require 'resque/plugins/heroku_autoscaler'

class TestJob
  extend Resque::Plugins::HerokuAutoscaler

  @queue = :test


When you add the job to your Resque queue, a new worker will be started if there isn't already one. If all jobs in the queue are processed the worker will be stopped again, keeping your costs low.

Currently there is no way build in to set how many workers to are being started. I plan on adding that functionality soon.

Jump to Line
Something went wrong with that request. Please try again.