sidekiq_monitor 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9b89b0c895fddab0247ec0940eb8c34c8f97cc2d
4
- data.tar.gz: 2c062635448ae9229e6b623f1d619f3262b9f718
3
+ metadata.gz: 092ec7ba4e8604563dce52a7eda83a62fcfdea66
4
+ data.tar.gz: d9ac218854ccd24cf565da69d2a66b76f40a1bf6
5
5
  SHA512:
6
- metadata.gz: 324cd4c58b6d1a38c3d69c9c7c44f73a2245fcc63a79a9be3ea21e005d422ea2d1a352acda95dde13bda5c8f2b419c019631041b40ae1a54ff80a81021d14d15
7
- data.tar.gz: 3e552c35b9169b6547037522c325c1d3a5a4df6e883c898971765c14a7cb07b77e910d871adbfaf4c5cc78a2fa632995e3e0ea70dcee7f54a9b8b9737d4016b0
6
+ metadata.gz: 7119b1fa2ba52b94c4523f449df161c75c396b15a0fe833986dc80d9dd4da32e871d6bf851f9f6d3846cc0ed11f87c728acf9995804ac2fd5d356cfcad91ffb7
7
+ data.tar.gz: 98ca97cbf0eaecaad9da9ddf24e28b3bf531010aa20e05a847edf20fb40f0e52bcbd930dac90d3725465ef4e760ba4bc02c5c0268a238a799843ea51b4cb400d
@@ -9,9 +9,9 @@ module Sidekiq
9
9
  end
10
10
 
11
11
  def graph
12
- queues_jobs = Job.select('queue, status').all.group_by(&:queue)
12
+ queues_jobs = Sidekiq::Monitor::Job.select('queue, status').all.group_by(&:queue)
13
13
  queues = []
14
- statuses = Job.statuses
14
+ statuses = Sidekiq::Monitor::Job.statuses
15
15
  queues_status_counts = queues_jobs.collect do |queue, jobs|
16
16
  statuses_jobs = jobs.group_by(&:status)
17
17
  statuses_job_counts = statuses_jobs.collect do |status, jobs|
@@ -30,7 +30,7 @@ module Sidekiq
30
30
  end
31
31
 
32
32
  def custom_views
33
- job = Job.find(params[:id])
33
+ job = Sidekiq::Monitor::Job.find(params[:id])
34
34
  render json: {}, status: 404 and return if job.blank?
35
35
 
36
36
  views = CustomViews.for_job(job)
@@ -47,7 +47,7 @@ module Sidekiq
47
47
  id = params[:id]
48
48
  render json: {}, status: 404 and return if id.blank?
49
49
 
50
- job = Job.find(id)
50
+ job = Sidekiq::Monitor::Job.find(id)
51
51
  render json: {}, status: 404 and return if job.blank?
52
52
 
53
53
  args = job.args
@@ -10,7 +10,7 @@ module Sidekiq
10
10
 
11
11
  status_counts = Sidekiq::Monitor::Job.where(queue: queue).count(group: 'status')
12
12
  ordered_status_counts = {}
13
- Job.statuses.each do |status|
13
+ Sidekiq::Monitor::Job.statuses.each do |status|
14
14
  ordered_status_counts[status] = status_counts.has_key?(status) ? status_counts[status] : 0
15
15
  end
16
16
  response = {
@@ -8,7 +8,7 @@ module Sidekiq
8
8
  helper Sidekiq::Monitor::SidekiqHelper
9
9
 
10
10
  def index
11
- @queues = Job.select('DISTINCT queue').collect { |job| job.queue }.sort
11
+ @queues = Sidekiq::Monitor::Job.select('DISTINCT queue').collect { |job| job.queue }.sort
12
12
  end
13
13
  end
14
14
  end
@@ -1,5 +1,5 @@
1
1
  module Sidekiq
2
2
  module Monitor
3
- VERSION = '0.1.5'
3
+ VERSION = '0.1.6'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq_monitor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Benner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-22 00:00:00.000000000 Z
11
+ date: 2014-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sidekiq