Skip to content


autoloading scalers #35

merged 1 commit into from

2 participants



Another pull request.

We've noticed that rush gem heavily pollutes our environment, hence we do not want to load it every time. To solve this I've switched dependency loading to autoload.

Hope you'll find it useful, thanks!

@lostboy lostboy merged commit a5486f1 into lostboy:master

1 check passed

Details default The Travis build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 6, 2012
  1. autoload scalers only when required

    Filip Tepper committed
Showing with 5 additions and 5 deletions.
  1. +5 −5 lib/workless/scaler.rb
10 lib/workless/scaler.rb
@@ -1,12 +1,12 @@
-require 'workless/scalers/heroku'
-require 'workless/scalers/heroku_cedar'
-require 'workless/scalers/local'
-require 'workless/scalers/null'
module Delayed
module Workless
module Scaler
+ autoload :Heroku, "workless/scalers/heroku"
+ autoload :HerokuCedar, "workless/scalers/heroku_cedar"
+ autoload :Local, "workless/scalers/local"
+ autoload :Null, "workless/scalers/null"
def self.included(base)
base.send :extend, ClassMethods
base.class_eval do
Something went wrong with that request. Please try again.