sidekiq 6.3.1 → 6.4.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of sidekiq might be problematic. Click here for more details.

Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/Changes.md +56 -0
  3. data/LICENSE +3 -3
  4. data/README.md +7 -2
  5. data/bin/sidekiq +3 -3
  6. data/bin/sidekiqload +57 -65
  7. data/bin/sidekiqmon +1 -1
  8. data/lib/generators/sidekiq/job_generator.rb +57 -0
  9. data/lib/generators/sidekiq/templates/{worker.rb.erb → job.rb.erb} +2 -2
  10. data/lib/generators/sidekiq/templates/{worker_spec.rb.erb → job_spec.rb.erb} +1 -1
  11. data/lib/generators/sidekiq/templates/{worker_test.rb.erb → job_test.rb.erb} +1 -1
  12. data/lib/sidekiq/api.rb +68 -62
  13. data/lib/sidekiq/cli.rb +16 -6
  14. data/lib/sidekiq/client.rb +44 -64
  15. data/lib/sidekiq/delay.rb +2 -0
  16. data/lib/sidekiq/extensions/generic_proxy.rb +1 -1
  17. data/lib/sidekiq/fetch.rb +2 -2
  18. data/lib/sidekiq/job_logger.rb +15 -27
  19. data/lib/sidekiq/job_retry.rb +28 -26
  20. data/lib/sidekiq/job_util.rb +67 -0
  21. data/lib/sidekiq/launcher.rb +37 -36
  22. data/lib/sidekiq/logger.rb +8 -18
  23. data/lib/sidekiq/manager.rb +13 -15
  24. data/lib/sidekiq/middleware/chain.rb +4 -4
  25. data/lib/sidekiq/middleware/current_attributes.rb +6 -1
  26. data/lib/sidekiq/middleware/i18n.rb +4 -4
  27. data/lib/sidekiq/monitor.rb +1 -1
  28. data/lib/sidekiq/paginator.rb +8 -8
  29. data/lib/sidekiq/processor.rb +27 -27
  30. data/lib/sidekiq/rails.rb +11 -4
  31. data/lib/sidekiq/redis_connection.rb +2 -2
  32. data/lib/sidekiq/scheduled.rb +13 -3
  33. data/lib/sidekiq/testing/inline.rb +4 -4
  34. data/lib/sidekiq/testing.rb +36 -35
  35. data/lib/sidekiq/util.rb +13 -0
  36. data/lib/sidekiq/version.rb +1 -1
  37. data/lib/sidekiq/web/application.rb +5 -2
  38. data/lib/sidekiq/web/csrf_protection.rb +2 -2
  39. data/lib/sidekiq/web/helpers.rb +4 -4
  40. data/lib/sidekiq/web.rb +3 -3
  41. data/lib/sidekiq/worker.rb +71 -16
  42. data/lib/sidekiq.rb +27 -15
  43. data/web/assets/javascripts/application.js +58 -26
  44. data/web/assets/stylesheets/application-dark.css +13 -17
  45. data/web/assets/stylesheets/application.css +4 -5
  46. data/web/views/_summary.erb +1 -1
  47. data/web/views/busy.erb +3 -3
  48. metadata +8 -7
  49. data/lib/generators/sidekiq/worker_generator.rb +0 -57
@@ -1,6 +1,6 @@
1
1
  html, body {
2
- background-color: #333 !important;
3
- color: #ddd;
2
+ background-color: #171717 !important;
3
+ color: #DEDEDE;
4
4
  }
5
5
 
6
6
  a,
@@ -30,15 +30,15 @@ span.current-interval,
30
30
 
31
31
  .navbar-inverse {
32
32
  background-color: #222;
33
- border-color: #555;
33
+ border-color: #444;
34
34
  }
35
35
 
36
36
  table {
37
- background-color: #282828;
37
+ background-color: #1D1D1D;
38
38
  }
39
39
 
40
40
  .table-striped > tbody > tr:nth-of-type(odd) {
41
- background-color: #333;
41
+ background-color: #2E2E2E;
42
42
  }
43
43
 
44
44
  .table-bordered,
@@ -48,7 +48,7 @@ table {
48
48
  .table-bordered > tfoot > tr > th,
49
49
  .table-bordered > thead > tr > td,
50
50
  .table-bordered > thead > tr > th {
51
- border: 1px solid #555;
51
+ border: 1px solid #444;
52
52
  }
53
53
 
54
54
  .table-hover > tbody > tr:hover {
@@ -72,9 +72,7 @@ table {
72
72
  background-color: #31708f;
73
73
  }
74
74
 
75
- a:link,
76
- a:active,
77
- a:hover {
75
+ a:link, a:active, a:hover, a:visited {
78
76
  color: #ddd;
79
77
  }
80
78
 
@@ -85,15 +83,13 @@ input {
85
83
  }
86
84
 
87
85
  .summary_bar .summary {
88
- background-color: #222;
89
- border: 1px solid #555;
90
-
91
- box-shadow: 0 0 5px rgba(255, 255, 255, .5);
86
+ background-color: #232323;
87
+ border: 1px solid #444;
92
88
  }
93
89
 
94
90
  .navbar-default {
95
- background-color: #222;
96
- border-color: #555;
91
+ background-color: #0F0F0F;
92
+ border-color: #444;
97
93
  }
98
94
 
99
95
  .navbar-default .navbar-nav > .active > a,
@@ -112,7 +108,7 @@ input {
112
108
  .pagination > li > span {
113
109
  color: #ddd;
114
110
  background-color: #333;
115
- border-color: #555;
111
+ border-color: #444;
116
112
  }
117
113
  .pagination > .disabled > a,
118
114
  .pagination > .disabled > a:focus,
@@ -122,7 +118,7 @@ input {
122
118
  .pagination > .disabled > span:hover {
123
119
  color: #ddd;
124
120
  background-color: #333;
125
- border-color: #555;
121
+ border-color: #444;
126
122
  }
127
123
 
128
124
  .stat {
@@ -21,7 +21,7 @@ body {
21
21
  a {
22
22
  color: #b1003e;
23
23
  }
24
- a:active, a:hover {
24
+ a:active, a:hover, a:focus {
25
25
  color: #4b001a;
26
26
  }
27
27
 
@@ -89,11 +89,10 @@ header.row .pagination {
89
89
  .summary_bar .summary {
90
90
  margin-top: 12px;
91
91
  background-color: #fff;
92
- box-shadow: 0 0 5px rgba(50, 50, 50, 0.25);
93
92
  border-radius: 4px;
93
+ border: 1px solid rgba(0, 0, 0, 0.1);
94
94
  padding: 8px;
95
95
  margin-bottom: 10px;
96
- border-width: 0;
97
96
  }
98
97
  .poll-wrapper {
99
98
  margin: 9px;
@@ -203,6 +202,7 @@ table .table-checkbox label {
203
202
 
204
203
  .navbar .navbar-brand .status {
205
204
  color: #585454;
205
+ display: inline;
206
206
  }
207
207
 
208
208
 
@@ -350,6 +350,7 @@ img.smallogo {
350
350
  text-align: center;
351
351
  margin-right: 20px;
352
352
  border: 1px solid rgba(0, 0, 0, 0.1);
353
+ border-radius: 4px;
353
354
  padding: 5px;
354
355
  width: 150px;
355
356
  margin-bottom: 20px;
@@ -405,8 +406,6 @@ span.current-interval {
405
406
 
406
407
  div.interval-slider input {
407
408
  width: 160px;
408
- height: 3px;
409
- margin-top: 5px;
410
409
  border-radius: 2px;
411
410
  background: currentcolor;
412
411
  }
@@ -9,7 +9,7 @@
9
9
  </li>
10
10
  <li class="busy col-sm-1">
11
11
  <a href="<%= root_path %>busy">
12
- <span id="txtBusy" class="count"><%= number_with_delimiter(workers.size) %></span>
12
+ <span id="txtBusy" class="count"><%= number_with_delimiter(workset.size) %></span>
13
13
  <span class="desc"><%= t('Busy') %></span>
14
14
  </a>
15
15
  </li>
data/web/views/busy.erb CHANGED
@@ -15,7 +15,7 @@
15
15
  <p><%= t('Threads') %></p>
16
16
  </div>
17
17
  <div class="stat">
18
- <h3><%= ws = workers.size; number_with_delimiter(ws) %></h3>
18
+ <h3><%= ws = workset.size; number_with_delimiter(ws) %></h3>
19
19
  <p><%= t('Busy') %></p>
20
20
  </div>
21
21
  <div class="stat">
@@ -48,7 +48,7 @@
48
48
  <thead>
49
49
  <th><%= t('Name') %></th>
50
50
  <th><%= t('Started') %></th>
51
- <th class="col-sm-1"><%= t('RSS') %><a href="https://github.com/mperham/sidekiq/wiki/Memory#rss"><span class="info-circle" title="Click to learn more about RSS">?</span></a></th>
51
+ <th class="col-sm-1"><%= t('RSS') %><a target="blank" href="https://github.com/mperham/sidekiq/wiki/Memory#rss"><span class="info-circle" title="Click to learn more about RSS">?</span></a></th>
52
52
  <th class="col-sm-1"><%= t('Threads') %></th>
53
53
  <th class="col-sm-1"><%= t('Busy') %></th>
54
54
  <th>&nbsp;</th>
@@ -109,7 +109,7 @@
109
109
  <th><%= t('Arguments') %></th>
110
110
  <th><%= t('Started') %></th>
111
111
  </thead>
112
- <% workers.each do |process, thread, msg| %>
112
+ <% workset.each do |process, thread, msg| %>
113
113
  <% job = Sidekiq::JobRecord.new(msg['payload']) %>
114
114
  <tr>
115
115
  <td><%= process %></td>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.3.1
4
+ version: 6.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Perham
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-07 00:00:00.000000000 Z
11
+ date: 2022-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis
@@ -67,10 +67,10 @@ files:
67
67
  - bin/sidekiq
68
68
  - bin/sidekiqload
69
69
  - bin/sidekiqmon
70
- - lib/generators/sidekiq/templates/worker.rb.erb
71
- - lib/generators/sidekiq/templates/worker_spec.rb.erb
72
- - lib/generators/sidekiq/templates/worker_test.rb.erb
73
- - lib/generators/sidekiq/worker_generator.rb
70
+ - lib/generators/sidekiq/job_generator.rb
71
+ - lib/generators/sidekiq/templates/job.rb.erb
72
+ - lib/generators/sidekiq/templates/job_spec.rb.erb
73
+ - lib/generators/sidekiq/templates/job_test.rb.erb
74
74
  - lib/sidekiq.rb
75
75
  - lib/sidekiq/api.rb
76
76
  - lib/sidekiq/cli.rb
@@ -85,6 +85,7 @@ files:
85
85
  - lib/sidekiq/job.rb
86
86
  - lib/sidekiq/job_logger.rb
87
87
  - lib/sidekiq/job_retry.rb
88
+ - lib/sidekiq/job_util.rb
88
89
  - lib/sidekiq/launcher.rb
89
90
  - lib/sidekiq/logger.rb
90
91
  - lib/sidekiq/manager.rb
@@ -192,7 +193,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
192
193
  - !ruby/object:Gem::Version
193
194
  version: '0'
194
195
  requirements: []
195
- rubygems_version: 3.1.4
196
+ rubygems_version: 3.2.32
196
197
  signing_key:
197
198
  specification_version: 4
198
199
  summary: Simple, efficient background processing for Ruby
@@ -1,57 +0,0 @@
1
- require "rails/generators/named_base"
2
-
3
- module Sidekiq
4
- module Generators # :nodoc:
5
- class WorkerGenerator < ::Rails::Generators::NamedBase # :nodoc:
6
- desc "This generator creates a Sidekiq Worker in app/workers and a corresponding test"
7
-
8
- check_class_collision suffix: "Worker"
9
-
10
- def self.default_generator_root
11
- File.dirname(__FILE__)
12
- end
13
-
14
- def create_worker_file
15
- template "worker.rb.erb", File.join("app/workers", class_path, "#{file_name}_worker.rb")
16
- end
17
-
18
- def create_test_file
19
- return unless test_framework
20
-
21
- if test_framework == :rspec
22
- create_worker_spec
23
- else
24
- create_worker_test
25
- end
26
- end
27
-
28
- private
29
-
30
- def create_worker_spec
31
- template_file = File.join(
32
- "spec/workers",
33
- class_path,
34
- "#{file_name}_worker_spec.rb"
35
- )
36
- template "worker_spec.rb.erb", template_file
37
- end
38
-
39
- def create_worker_test
40
- template_file = File.join(
41
- "test/workers",
42
- class_path,
43
- "#{file_name}_worker_test.rb"
44
- )
45
- template "worker_test.rb.erb", template_file
46
- end
47
-
48
- def file_name
49
- @_file_name ||= super.sub(/_?worker\z/i, "")
50
- end
51
-
52
- def test_framework
53
- ::Rails.application.config.generators.options[:rails][:test_framework]
54
- end
55
- end
56
- end
57
- end