sidekiq-monitoring 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/sidekiq-monitoring.rb +5 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 05f7351c183eb78e67ae33854d1ea42ec2ade1de
4
- data.tar.gz: 00409f8a0d8aa2b4238cdb1a4bc5f95f90d135ab
3
+ metadata.gz: 675a38eb7d23d9f7a4cd41827388c64509a1dee5
4
+ data.tar.gz: 43a2368a96c3535aeaf5d0b45c74a72059ffb840
5
5
  SHA512:
6
- metadata.gz: 1bd24caaf8940b5c6fb7b0286ee4c1f1683e4c6511694ba7d7d5c0973e3282e2c779c691b8c78f015cec3be317ea6242a058b997fb34b4d6b3c7440f8dbfe54e
7
- data.tar.gz: 6dc9c5d2b9a35985feb190662a74369d8e9255e624894ec48354610eb405c9cc78c477f4b195e002feac4231bdad8900269dbe373b602c2bafa17d7cb7c2186b
6
+ metadata.gz: de767a96630d623c759d8bff8df3a857a18e6cf633f0e710b452b0c902483f040776becd553213e0c6708b92e28a2831c3ba7ba654b3c8a9ac012aad68dc3770
7
+ data.tar.gz: 8f22fbeb67f081e22c621560db1724872765c15d0964083db60890dccc1e47690da9c0b7e0a48a597eafcbac1c7cff204310a3737f1c259dc202b1e86d528b5c
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.1
1
+ 1.1.0
@@ -113,6 +113,10 @@ class SidekiqMonitoring < Sinatra::Base
113
113
  'OK'
114
114
  end
115
115
 
116
+ def criticality
117
+ ALERT_STATUS[monitoring_status]
118
+ end
119
+
116
120
  end
117
121
 
118
122
  class Global
@@ -122,7 +126,7 @@ class SidekiqMonitoring < Sinatra::Base
122
126
  def as_json(options = {})
123
127
  {
124
128
  'global_status' => global_status,
125
- 'queues' => queues.map(&:as_json),
129
+ 'queues' => queues.select { |q| q.size > 0 }.sort_by(&:criticality).reverse!.map!(&:as_json),
126
130
  'workers' => workers.map(&:as_json)
127
131
  }
128
132
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq-monitoring
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Carlier
8
8
  autorequire:
9
9
  bindir: ''
10
10
  cert_chain: []
11
- date: 2016-03-15 00:00:00.000000000 Z
11
+ date: 2016-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sinatra