sidekiq 5.1.1 → 5.2.10

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 (56) hide show
  1. checksums.yaml +5 -5
  2. data/.circleci/config.yml +61 -0
  3. data/.gitignore +2 -0
  4. data/.travis.yml +5 -8
  5. data/COMM-LICENSE +11 -9
  6. data/Changes.md +96 -0
  7. data/Ent-Changes.md +28 -0
  8. data/Gemfile +16 -5
  9. data/LICENSE +1 -1
  10. data/Pro-Changes.md +43 -0
  11. data/README.md +1 -1
  12. data/Rakefile +2 -1
  13. data/bin/sidekiqctl +13 -92
  14. data/bin/sidekiqload +1 -1
  15. data/lib/sidekiq/api.rb +62 -28
  16. data/lib/sidekiq/cli.rb +68 -61
  17. data/lib/sidekiq/client.rb +31 -30
  18. data/lib/sidekiq/ctl.rb +221 -0
  19. data/lib/sidekiq/delay.rb +1 -0
  20. data/lib/sidekiq/fetch.rb +1 -1
  21. data/lib/sidekiq/job_logger.rb +4 -3
  22. data/lib/sidekiq/job_retry.rb +40 -14
  23. data/lib/sidekiq/launcher.rb +19 -13
  24. data/lib/sidekiq/logging.rb +3 -3
  25. data/lib/sidekiq/manager.rb +3 -4
  26. data/lib/sidekiq/middleware/server/active_record.rb +2 -1
  27. data/lib/sidekiq/processor.rb +79 -28
  28. data/lib/sidekiq/rails.rb +4 -8
  29. data/lib/sidekiq/redis_connection.rb +29 -2
  30. data/lib/sidekiq/scheduled.rb +33 -4
  31. data/lib/sidekiq/testing.rb +4 -4
  32. data/lib/sidekiq/util.rb +1 -1
  33. data/lib/sidekiq/version.rb +1 -1
  34. data/lib/sidekiq/web/action.rb +2 -2
  35. data/lib/sidekiq/web/application.rb +28 -3
  36. data/lib/sidekiq/web/helpers.rb +14 -7
  37. data/lib/sidekiq/web/router.rb +10 -10
  38. data/lib/sidekiq/web.rb +4 -4
  39. data/lib/sidekiq/worker.rb +31 -15
  40. data/lib/sidekiq.rb +8 -7
  41. data/sidekiq.gemspec +5 -12
  42. data/web/assets/javascripts/application.js +0 -0
  43. data/web/assets/javascripts/dashboard.js +15 -5
  44. data/web/assets/stylesheets/application.css +35 -2
  45. data/web/assets/stylesheets/bootstrap.css +2 -2
  46. data/web/locales/ar.yml +1 -0
  47. data/web/locales/en.yml +1 -0
  48. data/web/locales/es.yml +3 -3
  49. data/web/views/_footer.erb +3 -0
  50. data/web/views/_nav.erb +3 -17
  51. data/web/views/layout.erb +1 -1
  52. data/web/views/queue.erb +1 -0
  53. data/web/views/queues.erb +1 -1
  54. data/web/views/retries.erb +4 -0
  55. metadata +19 -87
  56. data/lib/sidekiq/middleware/server/active_record_cache.rb +0 -11
data/web/views/_nav.erb CHANGED
@@ -9,7 +9,7 @@
9
9
  <div class="navbar-toggle collapsed navbar-livereload">
10
10
  <%= erb :_poll_link %>
11
11
  <% if Sidekiq::Web.app_url %>
12
- <a class="btn btn-inverse" href="<%= Sidekiq::Web.app_url %>">Back to App</a>
12
+ <a class="btn btn-inverse" href="<%= Sidekiq::Web.app_url %>"><%= t('BackToApp') %></a>
13
13
  <% end %>
14
14
  </div>
15
15
  <a class="navbar-brand" href="<%= root_path %>">
@@ -32,27 +32,13 @@
32
32
  <% end %>
33
33
  <% end %>
34
34
 
35
- <li class="dropdown" data-navbar="dropdown">
36
- <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
37
- <%= t('Plugins') %> <span class="caret"></span>
38
- </a>
39
- <ul class="dropdown-menu" role="menu">
40
- <% Sidekiq::Web.custom_tabs.each do |title, url| %>
41
- <li>
42
- <a href="<%= root_path %><%= url %>"><%= t(title) %></a>
43
- </li>
44
- <% end %>
45
- </ul>
46
- </li>
47
-
48
35
  <% Sidekiq::Web.custom_tabs.each do |title, url| %>
49
36
  <li class="<%= current_path.start_with?(url) ? 'active' : '' %>" data-navbar="custom-tab">
50
37
  <a href="<%= root_path %><%= url %>"><%= t(title) %></a>
51
38
  </li>
52
39
  <% end %>
53
- </ul>
54
- <ul class="nav navbar-nav navbar-right navbar-livereload" data-navbar="static">
55
- <li>
40
+
41
+ <li class="navbar-livereload">
56
42
  <div class="poll-wrapper">
57
43
  <%= erb :_poll_link %>
58
44
  <% if Sidekiq::Web.app_url %>
data/web/views/layout.erb CHANGED
@@ -2,7 +2,7 @@
2
2
  <html dir="<%= text_direction %>">
3
3
  <head>
4
4
  <title><%= environment_title_prefix %><%= Sidekiq::NAME %></title>
5
- <meta charset="utf8" />
5
+ <meta charset="utf-8" />
6
6
  <meta name="viewport" content="width=device-width,initial-scale=1.0" />
7
7
 
8
8
  <link href="<%= root_path %>stylesheets/bootstrap.css" media="screen" rel="stylesheet" type="text/css" />
data/web/views/queue.erb CHANGED
@@ -5,6 +5,7 @@
5
5
  <% if @queue.paused? %>
6
6
  <span class="label label-danger"><%= t('Paused') %></span>
7
7
  <% end %>
8
+ <span class="badge badge-secondary"><%= number_with_delimiter(@total_size) %></span>
8
9
  </h3>
9
10
  </div>
10
11
  <div class="col-sm-4 pull-right flip">
data/web/views/queues.erb CHANGED
@@ -17,7 +17,7 @@
17
17
  <% end %>
18
18
  </td>
19
19
  <td><%= number_with_delimiter(queue.size) %> </td>
20
- <td><%= number_with_delimiter(queue.latency.round(2)) %> </td>
20
+ <td><% queue_latency = queue.latency %><%= number_with_delimiter(queue_latency.round(2)) %><%= (queue_latency < 60) ? '' : " (#{relative_time(Time.at(Time.now.to_f - queue_latency))})" %> </td>
21
21
  <td class="delete-confirm">
22
22
  <form action="<%=root_path %>queues/<%= CGI.escape(queue.name) %>" method="post">
23
23
  <%= csrf_tag %>
@@ -69,6 +69,10 @@
69
69
  <%= csrf_tag %>
70
70
  <input class="btn btn-danger btn-xs pull-right flip" type="submit" name="retry" value="<%= t('RetryAll') %>" data-confirm="<%= t('AreYouSure') %>" />
71
71
  </form>
72
+ <form action="<%= root_path %>retries/all/kill" method="post">
73
+ <%= csrf_tag %>
74
+ <input class="btn btn-danger btn-xs pull-right flip" type="submit" name="kill" value="<%= t('KillAll') %>" data-confirm="<%= t('AreYouSure') %>" />
75
+ </form>
72
76
  <% end %>
73
77
 
74
78
  <% else %>
metadata CHANGED
@@ -1,35 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.1
4
+ version: 5.2.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Perham
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-08 00:00:00.000000000 Z
11
+ date: 2022-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 3.3.5
19
+ version: '4.5'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '5'
22
+ version: 4.6.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - ">="
27
+ - - "~>"
28
28
  - !ruby/object:Gem::Version
29
- version: 3.3.5
29
+ version: '4.5'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '5'
32
+ version: 4.6.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: connection_pool
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -39,7 +39,7 @@ dependencies:
39
39
  version: '2.2'
40
40
  - - ">="
41
41
  - !ruby/object:Gem::Version
42
- version: 2.2.0
42
+ version: 2.2.2
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
@@ -49,21 +49,21 @@ dependencies:
49
49
  version: '2.2'
50
50
  - - ">="
51
51
  - !ruby/object:Gem::Version
52
- version: 2.2.0
52
+ version: 2.2.2
53
53
  - !ruby/object:Gem::Dependency
54
- name: concurrent-ruby
54
+ name: rack
55
55
  requirement: !ruby/object:Gem::Requirement
56
56
  requirements:
57
57
  - - "~>"
58
58
  - !ruby/object:Gem::Version
59
- version: '1.0'
59
+ version: '2.0'
60
60
  type: :runtime
61
61
  prerelease: false
62
62
  version_requirements: !ruby/object:Gem::Requirement
63
63
  requirements:
64
64
  - - "~>"
65
65
  - !ruby/object:Gem::Version
66
- version: '1.0'
66
+ version: '2.0'
67
67
  - !ruby/object:Gem::Dependency
68
68
  name: rack-protection
69
69
  requirement: !ruby/object:Gem::Requirement
@@ -78,74 +78,6 @@ dependencies:
78
78
  - - ">="
79
79
  - !ruby/object:Gem::Version
80
80
  version: 1.5.0
81
- - !ruby/object:Gem::Dependency
82
- name: redis-namespace
83
- requirement: !ruby/object:Gem::Requirement
84
- requirements:
85
- - - "~>"
86
- - !ruby/object:Gem::Version
87
- version: '1.5'
88
- - - ">="
89
- - !ruby/object:Gem::Version
90
- version: 1.5.2
91
- type: :development
92
- prerelease: false
93
- version_requirements: !ruby/object:Gem::Requirement
94
- requirements:
95
- - - "~>"
96
- - !ruby/object:Gem::Version
97
- version: '1.5'
98
- - - ">="
99
- - !ruby/object:Gem::Version
100
- version: 1.5.2
101
- - !ruby/object:Gem::Dependency
102
- name: minitest
103
- requirement: !ruby/object:Gem::Requirement
104
- requirements:
105
- - - "~>"
106
- - !ruby/object:Gem::Version
107
- version: '5.10'
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: 5.10.1
111
- type: :development
112
- prerelease: false
113
- version_requirements: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - "~>"
116
- - !ruby/object:Gem::Version
117
- version: '5.10'
118
- - - ">="
119
- - !ruby/object:Gem::Version
120
- version: 5.10.1
121
- - !ruby/object:Gem::Dependency
122
- name: rake
123
- requirement: !ruby/object:Gem::Requirement
124
- requirements:
125
- - - "~>"
126
- - !ruby/object:Gem::Version
127
- version: '10.0'
128
- type: :development
129
- prerelease: false
130
- version_requirements: !ruby/object:Gem::Requirement
131
- requirements:
132
- - - "~>"
133
- - !ruby/object:Gem::Version
134
- version: '10.0'
135
- - !ruby/object:Gem::Dependency
136
- name: rails
137
- requirement: !ruby/object:Gem::Requirement
138
- requirements:
139
- - - ">="
140
- - !ruby/object:Gem::Version
141
- version: 3.2.0
142
- type: :development
143
- prerelease: false
144
- version_requirements: !ruby/object:Gem::Requirement
145
- requirements:
146
- - - ">="
147
- - !ruby/object:Gem::Version
148
- version: 3.2.0
149
81
  description: Simple, efficient background processing for Ruby.
150
82
  email:
151
83
  - mperham@gmail.com
@@ -155,6 +87,7 @@ executables:
155
87
  extensions: []
156
88
  extra_rdoc_files: []
157
89
  files:
90
+ - ".circleci/config.yml"
158
91
  - ".github/contributing.md"
159
92
  - ".github/issue_template.md"
160
93
  - ".gitignore"
@@ -186,6 +119,7 @@ files:
186
119
  - lib/sidekiq/cli.rb
187
120
  - lib/sidekiq/client.rb
188
121
  - lib/sidekiq/core_ext.rb
122
+ - lib/sidekiq/ctl.rb
189
123
  - lib/sidekiq/delay.rb
190
124
  - lib/sidekiq/exception_handler.rb
191
125
  - lib/sidekiq/extensions/action_mailer.rb
@@ -201,7 +135,6 @@ files:
201
135
  - lib/sidekiq/middleware/chain.rb
202
136
  - lib/sidekiq/middleware/i18n.rb
203
137
  - lib/sidekiq/middleware/server/active_record.rb
204
- - lib/sidekiq/middleware/server/active_record_cache.rb
205
138
  - lib/sidekiq/paginator.rb
206
139
  - lib/sidekiq/processor.rb
207
140
  - lib/sidekiq/rails.rb
@@ -275,7 +208,7 @@ homepage: http://sidekiq.org
275
208
  licenses:
276
209
  - LGPL-3.0
277
210
  metadata: {}
278
- post_install_message:
211
+ post_install_message:
279
212
  rdoc_options: []
280
213
  require_paths:
281
214
  - lib
@@ -290,9 +223,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
290
223
  - !ruby/object:Gem::Version
291
224
  version: '0'
292
225
  requirements: []
293
- rubyforge_project:
294
- rubygems_version: 2.6.13
295
- signing_key:
226
+ rubygems_version: 3.2.32
227
+ signing_key:
296
228
  specification_version: 4
297
229
  summary: Simple, efficient background processing for Ruby
298
230
  test_files: []
@@ -1,11 +0,0 @@
1
- module Sidekiq
2
- module Middleware
3
- module Server
4
- class ActiveRecordCache
5
- def call(*args, &block)
6
- ::ActiveRecord::Base.cache(&block)
7
- end
8
- end
9
- end
10
- end
11
- end