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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 092ec7ba4e8604563dce52a7eda83a62fcfdea66
|
4
|
+
data.tar.gz: d9ac218854ccd24cf565da69d2a66b76f40a1bf6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 = {
|
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.
|
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-
|
11
|
+
date: 2014-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sidekiq
|