RubyGems
npm
Organizations
Log in
Sign up
RubyGems
rcarvalho-workless
Versions diffs
1.0.2.14 → 1.0.2.15
rcarvalho-workless 1.0.2.14 → 1.0.2.15
Sign up to get
free
protection for your applications and to get access to all the features.
Files changed (3)
hide
show
data/lib/workless/scalers/heroku.rb
+5
-0
data/lib/workless/scalers/heroku_cedar.rb
+4
-0
metadata
+2
-2
data/lib/workless/scalers/heroku.rb
CHANGED
Viewed
@@ -29,6 +29,11 @@ module Delayed
29
29
end
30
30
rescue
31
31
end
32
+
33
+
def self.workers
34
+
client.info(ENV['APP_NAME'])[:workers].to_i
35
+
end
36
+
32
37
end
33
38
34
39
end
data/lib/workless/scalers/heroku_cedar.rb
CHANGED
Viewed
@@ -31,6 +31,10 @@ module Delayed
31
31
end
32
32
end
33
33
34
+
def self.workers
35
+
client.ps(ENV['APP_NAME']).count { |p| p["process"] =~ /worker\.\d?/ }
36
+
end
37
+
34
38
end
35
39
end
36
40
end
metadata
CHANGED
Viewed
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
6
6
- 1
7
7
- 0
8
8
- 2
9
-
-
14
10
-
version: 1.0.2.
14
9
+
-
15
10
+
version: 1.0.2.
15
11
11
platform: ruby
12
12
authors:
13
13
- lostboy