cloudscopes 0.11.2 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cloudscopes/redis.rb +6 -0
- data/lib/cloudscopes/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c7182139ec74e6caacda75e369529f749a2b68d
|
4
|
+
data.tar.gz: a3cb978af5f74a4b9feda4bd5a1d2bcc75770db0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56de7e57bbb02da1cb35dcfa9e9c42eff08b514ca37bc7c7ad71a84100bf4c4ab20d43062c411612877ed945ff0386133173ddabcb93a41d859db43c3fbfdf86
|
7
|
+
data.tar.gz: 678e8dc160d116a7149f7bf139add16366fe1a47c4ad34502408304e67a5a5099fc4d96ad4dfc1dfa7bd0696f8b13aafdbf26f2e48ad0de927697075124725da
|
data/lib/cloudscopes/redis.rb
CHANGED
@@ -26,6 +26,12 @@ module Cloudscopes
|
|
26
26
|
@redis.keys("resque:worker:*:#{queue}").count
|
27
27
|
when :inactive
|
28
28
|
resque_workers(queue, :available) - resque_workers(queue, :active)
|
29
|
+
when :usage
|
30
|
+
if resque_workers(queue, :available) > 0
|
31
|
+
resque_workers(queue, :active) / resque_workers(queue, :available)
|
32
|
+
else
|
33
|
+
1
|
34
|
+
end
|
29
35
|
else
|
30
36
|
@redis.keys("resque:worker:*:#{queue}:started").count
|
31
37
|
end
|
data/lib/cloudscopes/version.rb
CHANGED