rcarvalho-workless 1.0.2.8 → 1.0.2.9
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/workless/scalers/heroku_cedar.rb +3 -3
- metadata +2 -2
@@ -9,7 +9,7 @@ module Delayed
|
|
9
9
|
extend Delayed::Workless::Scaler::HerokuClient
|
10
10
|
|
11
11
|
def self.up
|
12
|
-
@@current_num_workers
|
12
|
+
@@current_num_workers ||= 0
|
13
13
|
nw = self.calculate_num_workers
|
14
14
|
if nw
|
15
15
|
if @@current_num_workers != nw
|
@@ -21,7 +21,7 @@ module Delayed
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def self.down
|
24
|
-
@@current_num_workers
|
24
|
+
@@current_num_workers ||= 0
|
25
25
|
nw = self.calculate_num_workers
|
26
26
|
if nw
|
27
27
|
if @@current_num_workers != nw
|
@@ -33,7 +33,7 @@ module Delayed
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def self.workers
|
36
|
-
@@current_num_workers
|
36
|
+
@@current_num_workers ||= 0
|
37
37
|
@@current_num_workers || client.ps(ENV['APP_NAME']).count { |p| p["process"] =~ /worker\.\d?/ }
|
38
38
|
end
|
39
39
|
|