lib/workless/scalers/local.rb in workless-0.0.9 vs lib/workless/scalers/local.rb in workless-0.1.0
- old
+ new
@@ -5,10 +5,10 @@
module Scaler
class Local < Base
def up
- Rush::Box.new[Rails.root].bash("rake jobs:work", :background => true)
+ Rush::Box.new[Rails.root].bash("rake jobs:work", :background => true) if workers == 0
true
end
def down
Rush::Box.new.processes.filter(:cmdline => /rake jobs:work/).kill unless workers == 0 or jobs.count > 0
\ No newline at end of file