rcarvalho-workless 1.0.2.7 → 1.0.2.8
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 -0
- metadata +2 -2
@@ -9,6 +9,7 @@ module Delayed
|
|
9
9
|
extend Delayed::Workless::Scaler::HerokuClient
|
10
10
|
|
11
11
|
def self.up
|
12
|
+
@@current_num_workers || 0
|
12
13
|
nw = self.calculate_num_workers
|
13
14
|
if nw
|
14
15
|
if @@current_num_workers != nw
|
@@ -20,6 +21,7 @@ module Delayed
|
|
20
21
|
end
|
21
22
|
|
22
23
|
def self.down
|
24
|
+
@@current_num_workers || 0
|
23
25
|
nw = self.calculate_num_workers
|
24
26
|
if nw
|
25
27
|
if @@current_num_workers != nw
|
@@ -31,6 +33,7 @@ module Delayed
|
|
31
33
|
end
|
32
34
|
|
33
35
|
def self.workers
|
36
|
+
@@current_num_workers || 0
|
34
37
|
@@current_num_workers || client.ps(ENV['APP_NAME']).count { |p| p["process"] =~ /worker\.\d?/ }
|
35
38
|
end
|
36
39
|
|