Permalink
Browse files

autoload scalers only when required

  • Loading branch information...
1 parent ec5bd10 commit f5a1075b9c524b419abab4d5f475b692359de58f Filip Tepper committed Dec 6, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 lib/workless/scaler.rb
View
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

0 comments on commit f5a1075

Please sign in to comment.