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.
@@ -9,7 +9,7 @@ module Delayed
9
9
  extend Delayed::Workless::Scaler::HerokuClient
10
10
 
11
11
  def self.up
12
- @@current_num_workers || 0
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 || 0
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 || 0
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
 
metadata CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
6
6
  - 1
7
7
  - 0
8
8
  - 2
9
- - 8
10
- version: 1.0.2.8
9
+ - 9
10
+ version: 1.0.2.9
11
11
  platform: ruby
12
12
  authors:
13
13
  - lostboy