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.
@@ -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
 
metadata CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
6
6
  - 1
7
7
  - 0
8
8
  - 2
9
- - 7
10
- version: 1.0.2.7
9
+ - 8
10
+ version: 1.0.2.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - lostboy