sidekiq-job-stats 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c148c5169ea6f50b247b115078189ca2c87507c594828f1265ff0712a5f36df8
4
- data.tar.gz: b16336e276fbe2f4602cb42c35790e6ab782e268422eb9275c3cc3a17e7cde3b
3
+ metadata.gz: 4f64a36ba3d536394e382f3548ac1141465f0b95ecfaa0d808a98ab58f7ed815
4
+ data.tar.gz: f77329570bfcf310494f71f3a8cc9a35ab4e85b4ef98d1f5a2c8d71ae5838562
5
5
  SHA512:
6
- metadata.gz: c9e90f74596e40c2dc88365a2538a819096e6588043b756824debde4671cf8b1272299b7a920bf1ff840c6caee5f01346144dfd1083f32424d7df6aacd298137
7
- data.tar.gz: 1ed3d23f01d593171a46c51a98d48f3b7cfec84577b7ba151de9cd8a7e42af2f928ce1f84c775beb5acd395770a9f385904e149db272be0a8bca0bcfc091584c
6
+ metadata.gz: eced075ff890513cc03b6449c0c7dc95e4129cd48ed805d235f8e09713bf6ee9d245594187db84aa6fc54638acdffdc576304b39d8c312213a9a1756a5f3fe6c
7
+ data.tar.gz: 52eaa24c7d5521aba6912a2660a5cefc7e83accc77474de705f5d7f3fca3206e1a0424683368c014e73e015a3e4f2bd15635b87f83204cd70be016a675452a15
data/README.md CHANGED
@@ -1,4 +1,6 @@
1
1
  # Sidekiq::Job::Stats
2
+ Sidekiq Job Stats is a gem that provides functionality to track and monitor job statistics in Sidekiq, inspired by the functionality provided by the "resque-job-stats" gem.
3
+
2
4
 
3
5
  ## Installation
4
6
 
@@ -8,4 +10,9 @@ In your Gemfile add:
8
10
 
9
11
  ```ruby
10
12
  gem 'sidekiq-job-stats'
11
- ```
13
+ ```
14
+
15
+ <img src="https://github.com/sliusar-ihor/sidekiq-job-stats/blob/main/examples/main.png" style="max-width: 100%;">
16
+ <img src="https://github.com/sliusar-ihor/sidekiq-job-stats/blob/main/examples/1.png" style="max-width: 100%;">
17
+
18
+
data/examples/1.png ADDED
Binary file
data/examples/main.png ADDED
Binary file
@@ -34,6 +34,10 @@ module SidekiqJobStats
34
34
  self.job_class = job_class
35
35
  end
36
36
 
37
+ def <=>(other)
38
+ self.name <=> other.name
39
+ end
40
+
37
41
  %w[duration memory_usage history enqueued].each do |method_name|
38
42
  define_method(method_name) do
39
43
  instance_variable_get("@#{method_name}") ||
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SidekiqJobStats
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
@@ -10,14 +10,12 @@ module SidekiqJobStats
10
10
  app.helpers Helpers::Stats
11
11
 
12
12
  app.get '/history' do
13
- ApplicantScoringWorker #todo
14
13
  @jobs = SidekiqJobStats::Statistic.find_all.sort
15
14
 
16
15
  render(:erb, File.read("#{ROOT}/views/job_stats.erb"))
17
16
  end
18
17
 
19
18
  app.get '/history/job_history/:job_class' do
20
- ApplicantScoringWorker #todo
21
19
  @job_class = SidekiqJobStats::Statistic.find_all.find { |j| j.job_class.to_s == params[:job_class] }
22
20
 
23
21
  @start = 0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq-job-stats
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - isliusar
@@ -52,6 +52,8 @@ files:
52
52
  - LICENSE.txt
53
53
  - README.md
54
54
  - Rakefile
55
+ - examples/1.png
56
+ - examples/main.png
55
57
  - lib/sidekiq_job_stats.rb
56
58
  - lib/sidekiq_job_stats/duration.rb
57
59
  - lib/sidekiq_job_stats/enqueued.rb
@@ -88,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
88
90
  - !ruby/object:Gem::Version
89
91
  version: '0'
90
92
  requirements: []
91
- rubygems_version: 3.4.10
93
+ rubygems_version: 3.2.22
92
94
  signing_key:
93
95
  specification_version: 4
94
96
  summary: Tracks jobs performed, failed, and the duration of the last 100 jobs for