Browse files

Merge branch 'master' of

  • Loading branch information...
2 parents 70af1a2 + d7f664c commit d7589da0160552e3d477efa6ca79d316f430b112 @lostboy committed Jun 3, 2012
Showing with 36 additions and 6 deletions.
  1. +35 −5
  2. +1 −1 lib/workless/scaler.rb
@@ -5,21 +5,51 @@
This is an addon for delayed_job (> 2.0.0)
It is designed to be used when you're using Heroku as a host and have the need to do background work with delayed job but you don't want to leave the workers running all the time as it costs money.
-You basically add the gem to your project and the rest is taken care of for you given a few CONFIG vars set on Heroku.
+By adding the gem to your project and configuring our Heroku app with some config variables workless should do the rest.
-There are already a few of these out there, notably @mtravers' cheepnis and the autoscale branch of delayed_job by @pedro
+## Update
-Workless takes ideas from both and is helping me understand gem and plugin development. Prior to version 1.0.0 it was originally built for rails 3 on the delayed_job 2.1.0.pre2 but since 1.0.0 is compatible with rails 2.3.x, 3.0.x, 3.1.x and 3.2.x
+Version 1.0.0 has been released, this brings compatibility with delayed_job 3 and compatibility with Rails 2.3.x and up.
+## Compatibility
+Workless should work correctly with Rubies 1.8.7, ree, 1.9.2 and 1.9.3. It is compatible with Delayed Job since version 2.0.7 up to the latest version 3.0.1, the table below shows tested compatibility with ruby, rails and delayed_job
+Ruby | Rails | Delayed Job
+---------- | ------ | -----
+1.8.7-ree | 2.1.14 | 2.0.7
+1.9.2 | 3.2 | 2.1.4
+1.9.2 | 3.2 | 3.0.1
## Installation
Add the workless gem and the delayed_job gem to your project Gemfile and update your bundle. Its is recommended to specify the gem version for delayed_job especially if you are using rails 2.3.x which doesn't work with the latest delayed_job
+### For rails 2.3.x the latest compatible delayed_job is 2.0.7
-gem "workless"
+gem "delayed_job", "2.0.7"
+gem "workless", "~> 1.0.1"
-Add your Heroku username / password as config vars to your Heroku instance, the same one you log in to Heroku with
+### For rails 3.x with delayed_job 2.1.x
+gem "delayed_job", "~> 2.1.4"
+gem "workless", "~> 1.0.1"
+### For rails 3.x with latest delayed_job 3.x using active record
+gem "delayed_job_active_record"
+gem "workless", "~> 1.0.1"
+If you don't specify delayed_job in your Gemfile workless will bring it in, most likly the latest version (3.0.1)
+Add your Heroku username / password as config vars to your Heroku instance, the same one you log in to Heroku with.
+[You may also use your API key as the password](
heroku config:add HEROKU_USER=yourusername HEROKU_PASSWORD=yourpassword
@@ -19,7 +19,7 @@ def self.included(base)
module ClassMethods
def scaler
- @scaler ||= if ENV.include?("HEROKU_UPID")
+ @scaler ||= if ENV.include?("HEROKU_USER")
when "cedar"

0 comments on commit d7589da

Please sign in to comment.