sidekiq 6.0.4 → 7.0.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 (143) hide show
  1. checksums.yaml +4 -4
  2. data/Changes.md +336 -6
  3. data/LICENSE.txt +9 -0
  4. data/README.md +22 -20
  5. data/bin/sidekiq +22 -3
  6. data/bin/sidekiqload +71 -76
  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 +365 -230
  13. data/lib/sidekiq/capsule.rb +110 -0
  14. data/lib/sidekiq/cli.rb +120 -86
  15. data/lib/sidekiq/client.rb +81 -85
  16. data/lib/sidekiq/{util.rb → component.rb} +13 -14
  17. data/lib/sidekiq/config.rb +270 -0
  18. data/lib/sidekiq/deploy.rb +62 -0
  19. data/lib/sidekiq/embedded.rb +61 -0
  20. data/lib/sidekiq/fetch.rb +42 -32
  21. data/lib/sidekiq/{worker.rb → job.rb} +165 -34
  22. data/lib/sidekiq/job_logger.rb +18 -30
  23. data/lib/sidekiq/job_retry.rb +80 -60
  24. data/lib/sidekiq/job_util.rb +71 -0
  25. data/lib/sidekiq/launcher.rb +173 -85
  26. data/lib/sidekiq/logger.rb +13 -47
  27. data/lib/sidekiq/manager.rb +40 -41
  28. data/lib/sidekiq/metrics/query.rb +153 -0
  29. data/lib/sidekiq/metrics/shared.rb +95 -0
  30. data/lib/sidekiq/metrics/tracking.rb +134 -0
  31. data/lib/sidekiq/middleware/chain.rb +90 -46
  32. data/lib/sidekiq/middleware/current_attributes.rb +58 -0
  33. data/lib/sidekiq/middleware/i18n.rb +6 -4
  34. data/lib/sidekiq/middleware/modules.rb +21 -0
  35. data/lib/sidekiq/monitor.rb +19 -4
  36. data/lib/sidekiq/paginator.rb +17 -9
  37. data/lib/sidekiq/processor.rb +57 -60
  38. data/lib/sidekiq/rails.rb +33 -23
  39. data/lib/sidekiq/redis_client_adapter.rb +115 -0
  40. data/lib/sidekiq/redis_connection.rb +21 -87
  41. data/lib/sidekiq/ring_buffer.rb +29 -0
  42. data/lib/sidekiq/scheduled.rb +102 -39
  43. data/lib/sidekiq/sd_notify.rb +149 -0
  44. data/lib/sidekiq/systemd.rb +24 -0
  45. data/lib/sidekiq/testing/inline.rb +4 -4
  46. data/lib/sidekiq/testing.rb +43 -72
  47. data/lib/sidekiq/transaction_aware_client.rb +44 -0
  48. data/lib/sidekiq/version.rb +2 -1
  49. data/lib/sidekiq/web/action.rb +3 -3
  50. data/lib/sidekiq/web/application.rb +47 -24
  51. data/lib/sidekiq/web/csrf_protection.rb +180 -0
  52. data/lib/sidekiq/web/helpers.rb +59 -47
  53. data/lib/sidekiq/web/router.rb +6 -5
  54. data/lib/sidekiq/web.rb +31 -74
  55. data/lib/sidekiq/worker_compatibility_alias.rb +13 -0
  56. data/lib/sidekiq.rb +86 -199
  57. data/sidekiq.gemspec +36 -7
  58. data/web/assets/images/apple-touch-icon.png +0 -0
  59. data/web/assets/javascripts/application.js +130 -61
  60. data/web/assets/javascripts/base-charts.js +106 -0
  61. data/web/assets/javascripts/chart.min.js +13 -0
  62. data/web/assets/javascripts/chartjs-plugin-annotation.min.js +7 -0
  63. data/web/assets/javascripts/dashboard-charts.js +166 -0
  64. data/web/assets/javascripts/dashboard.js +36 -273
  65. data/web/assets/javascripts/metrics.js +236 -0
  66. data/web/assets/stylesheets/application-dark.css +146 -124
  67. data/web/assets/stylesheets/application-rtl.css +2 -95
  68. data/web/assets/stylesheets/application.css +100 -529
  69. data/web/locales/ar.yml +71 -65
  70. data/web/locales/cs.yml +62 -62
  71. data/web/locales/da.yml +52 -52
  72. data/web/locales/de.yml +65 -65
  73. data/web/locales/el.yml +43 -24
  74. data/web/locales/en.yml +83 -67
  75. data/web/locales/es.yml +70 -54
  76. data/web/locales/fa.yml +65 -65
  77. data/web/locales/fr.yml +69 -62
  78. data/web/locales/he.yml +65 -64
  79. data/web/locales/hi.yml +59 -59
  80. data/web/locales/it.yml +53 -53
  81. data/web/locales/ja.yml +73 -65
  82. data/web/locales/ko.yml +52 -52
  83. data/web/locales/lt.yml +83 -0
  84. data/web/locales/nb.yml +61 -61
  85. data/web/locales/nl.yml +52 -52
  86. data/web/locales/pl.yml +45 -45
  87. data/web/locales/pt-br.yml +63 -55
  88. data/web/locales/pt.yml +51 -51
  89. data/web/locales/ru.yml +68 -63
  90. data/web/locales/sv.yml +53 -53
  91. data/web/locales/ta.yml +60 -60
  92. data/web/locales/uk.yml +62 -61
  93. data/web/locales/ur.yml +64 -64
  94. data/web/locales/vi.yml +83 -0
  95. data/web/locales/zh-cn.yml +43 -16
  96. data/web/locales/zh-tw.yml +42 -8
  97. data/web/views/_footer.erb +6 -3
  98. data/web/views/_job_info.erb +17 -1
  99. data/web/views/_nav.erb +1 -1
  100. data/web/views/_poll_link.erb +3 -6
  101. data/web/views/_summary.erb +7 -7
  102. data/web/views/busy.erb +70 -21
  103. data/web/views/dashboard.erb +58 -18
  104. data/web/views/dead.erb +1 -1
  105. data/web/views/layout.erb +3 -2
  106. data/web/views/metrics.erb +80 -0
  107. data/web/views/metrics_for_job.erb +69 -0
  108. data/web/views/morgue.erb +7 -7
  109. data/web/views/queue.erb +15 -11
  110. data/web/views/queues.erb +4 -4
  111. data/web/views/retries.erb +8 -8
  112. data/web/views/retry.erb +1 -1
  113. data/web/views/scheduled.erb +2 -2
  114. metadata +79 -55
  115. data/.circleci/config.yml +0 -82
  116. data/.github/contributing.md +0 -32
  117. data/.github/issue_template.md +0 -11
  118. data/.gitignore +0 -13
  119. data/.standard.yml +0 -20
  120. data/3.0-Upgrade.md +0 -70
  121. data/4.0-Upgrade.md +0 -53
  122. data/5.0-Upgrade.md +0 -56
  123. data/6.0-Upgrade.md +0 -72
  124. data/COMM-LICENSE +0 -97
  125. data/Ent-2.0-Upgrade.md +0 -37
  126. data/Ent-Changes.md +0 -256
  127. data/Gemfile +0 -24
  128. data/Gemfile.lock +0 -199
  129. data/LICENSE +0 -9
  130. data/Pro-2.0-Upgrade.md +0 -138
  131. data/Pro-3.0-Upgrade.md +0 -44
  132. data/Pro-4.0-Upgrade.md +0 -35
  133. data/Pro-5.0-Upgrade.md +0 -25
  134. data/Pro-Changes.md +0 -776
  135. data/Rakefile +0 -10
  136. data/code_of_conduct.md +0 -50
  137. data/lib/generators/sidekiq/worker_generator.rb +0 -57
  138. data/lib/sidekiq/delay.rb +0 -41
  139. data/lib/sidekiq/exception_handler.rb +0 -27
  140. data/lib/sidekiq/extensions/action_mailer.rb +0 -47
  141. data/lib/sidekiq/extensions/active_record.rb +0 -42
  142. data/lib/sidekiq/extensions/class_methods.rb +0 -42
  143. data/lib/sidekiq/extensions/generic_proxy.rb +0 -31
data/web/views/retry.erb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  <h3><%= t('Error') %></h3>
4
4
  <div class="table_container">
5
- <table class="error table table-bordered table-striped">
5
+ <table class="error table table-bordered table-striped table-hover">
6
6
  <tbody>
7
7
  <tr>
8
8
  <th><%= t('ErrorClass') %></th>
@@ -15,7 +15,7 @@
15
15
  <form action="<%= root_path %>scheduled" method="post">
16
16
  <%= csrf_tag %>
17
17
  <div class="table_container">
18
- <table class="table table-striped table-bordered table-white">
18
+ <table class="table table-striped table-bordered table-hover">
19
19
  <thead>
20
20
  <tr>
21
21
  <th class="checkbox-column">
@@ -30,7 +30,7 @@
30
30
  <% @scheduled.each do |entry| %>
31
31
  <tr>
32
32
  <td>
33
- <input type='checkbox' name='key[]' value='<%= job_params(entry.item, entry.score) %>' />
33
+ <input type='checkbox' name='key[]' value='<%= job_params(entry.item, entry.score) %>' class='shift_clickable' />
34
34
  </td>
35
35
  <td>
36
36
  <a href="<%= root_path %>scheduled/<%= job_params(entry.item, entry.score) %>"><%= relative_time(entry.at) %></a>
metadata CHANGED
@@ -1,71 +1,71 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.4
4
+ version: 7.0.2
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: 2019-12-20 00:00:00.000000000 Z
11
+ date: 2022-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: redis
14
+ name: redis-client
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 4.1.0
19
+ version: 0.11.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 4.1.0
26
+ version: 0.11.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: connection_pool
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 2.2.2
33
+ version: 2.3.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 2.2.2
40
+ version: 2.3.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rack
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 2.0.0
47
+ version: 2.2.4
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: 2.0.0
54
+ version: 2.2.4
55
55
  - !ruby/object:Gem::Dependency
56
- name: rack-protection
56
+ name: concurrent-ruby
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - "<"
60
60
  - !ruby/object:Gem::Version
61
- version: 2.0.0
61
+ version: '2'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - "<"
67
67
  - !ruby/object:Gem::Version
68
- version: 2.0.0
68
+ version: '2'
69
69
  description: Simple, efficient background processing for Ruby.
70
70
  email:
71
71
  - mperham@gmail.com
@@ -75,77 +75,73 @@ executables:
75
75
  extensions: []
76
76
  extra_rdoc_files: []
77
77
  files:
78
- - ".circleci/config.yml"
79
- - ".github/contributing.md"
80
- - ".github/issue_template.md"
81
- - ".gitignore"
82
- - ".standard.yml"
83
- - 3.0-Upgrade.md
84
- - 4.0-Upgrade.md
85
- - 5.0-Upgrade.md
86
- - 6.0-Upgrade.md
87
- - COMM-LICENSE
88
78
  - Changes.md
89
- - Ent-2.0-Upgrade.md
90
- - Ent-Changes.md
91
- - Gemfile
92
- - Gemfile.lock
93
- - LICENSE
94
- - Pro-2.0-Upgrade.md
95
- - Pro-3.0-Upgrade.md
96
- - Pro-4.0-Upgrade.md
97
- - Pro-5.0-Upgrade.md
98
- - Pro-Changes.md
79
+ - LICENSE.txt
99
80
  - README.md
100
- - Rakefile
101
81
  - bin/sidekiq
102
82
  - bin/sidekiqload
103
83
  - bin/sidekiqmon
104
- - code_of_conduct.md
105
- - lib/generators/sidekiq/templates/worker.rb.erb
106
- - lib/generators/sidekiq/templates/worker_spec.rb.erb
107
- - lib/generators/sidekiq/templates/worker_test.rb.erb
108
- - lib/generators/sidekiq/worker_generator.rb
84
+ - lib/generators/sidekiq/job_generator.rb
85
+ - lib/generators/sidekiq/templates/job.rb.erb
86
+ - lib/generators/sidekiq/templates/job_spec.rb.erb
87
+ - lib/generators/sidekiq/templates/job_test.rb.erb
109
88
  - lib/sidekiq.rb
110
89
  - lib/sidekiq/api.rb
90
+ - lib/sidekiq/capsule.rb
111
91
  - lib/sidekiq/cli.rb
112
92
  - lib/sidekiq/client.rb
113
- - lib/sidekiq/delay.rb
114
- - lib/sidekiq/exception_handler.rb
115
- - lib/sidekiq/extensions/action_mailer.rb
116
- - lib/sidekiq/extensions/active_record.rb
117
- - lib/sidekiq/extensions/class_methods.rb
118
- - lib/sidekiq/extensions/generic_proxy.rb
93
+ - lib/sidekiq/component.rb
94
+ - lib/sidekiq/config.rb
95
+ - lib/sidekiq/deploy.rb
96
+ - lib/sidekiq/embedded.rb
119
97
  - lib/sidekiq/fetch.rb
98
+ - lib/sidekiq/job.rb
120
99
  - lib/sidekiq/job_logger.rb
121
100
  - lib/sidekiq/job_retry.rb
101
+ - lib/sidekiq/job_util.rb
122
102
  - lib/sidekiq/launcher.rb
123
103
  - lib/sidekiq/logger.rb
124
104
  - lib/sidekiq/manager.rb
105
+ - lib/sidekiq/metrics/query.rb
106
+ - lib/sidekiq/metrics/shared.rb
107
+ - lib/sidekiq/metrics/tracking.rb
125
108
  - lib/sidekiq/middleware/chain.rb
109
+ - lib/sidekiq/middleware/current_attributes.rb
126
110
  - lib/sidekiq/middleware/i18n.rb
111
+ - lib/sidekiq/middleware/modules.rb
127
112
  - lib/sidekiq/monitor.rb
128
113
  - lib/sidekiq/paginator.rb
129
114
  - lib/sidekiq/processor.rb
130
115
  - lib/sidekiq/rails.rb
116
+ - lib/sidekiq/redis_client_adapter.rb
131
117
  - lib/sidekiq/redis_connection.rb
118
+ - lib/sidekiq/ring_buffer.rb
132
119
  - lib/sidekiq/scheduled.rb
120
+ - lib/sidekiq/sd_notify.rb
121
+ - lib/sidekiq/systemd.rb
133
122
  - lib/sidekiq/testing.rb
134
123
  - lib/sidekiq/testing/inline.rb
135
- - lib/sidekiq/util.rb
124
+ - lib/sidekiq/transaction_aware_client.rb
136
125
  - lib/sidekiq/version.rb
137
126
  - lib/sidekiq/web.rb
138
127
  - lib/sidekiq/web/action.rb
139
128
  - lib/sidekiq/web/application.rb
129
+ - lib/sidekiq/web/csrf_protection.rb
140
130
  - lib/sidekiq/web/helpers.rb
141
131
  - lib/sidekiq/web/router.rb
142
- - lib/sidekiq/worker.rb
132
+ - lib/sidekiq/worker_compatibility_alias.rb
143
133
  - sidekiq.gemspec
134
+ - web/assets/images/apple-touch-icon.png
144
135
  - web/assets/images/favicon.ico
145
136
  - web/assets/images/logo.png
146
137
  - web/assets/images/status.png
147
138
  - web/assets/javascripts/application.js
139
+ - web/assets/javascripts/base-charts.js
140
+ - web/assets/javascripts/chart.min.js
141
+ - web/assets/javascripts/chartjs-plugin-annotation.min.js
142
+ - web/assets/javascripts/dashboard-charts.js
148
143
  - web/assets/javascripts/dashboard.js
144
+ - web/assets/javascripts/metrics.js
149
145
  - web/assets/stylesheets/application-dark.css
150
146
  - web/assets/stylesheets/application-rtl.css
151
147
  - web/assets/stylesheets/application.css
@@ -165,6 +161,7 @@ files:
165
161
  - web/locales/it.yml
166
162
  - web/locales/ja.yml
167
163
  - web/locales/ko.yml
164
+ - web/locales/lt.yml
168
165
  - web/locales/nb.yml
169
166
  - web/locales/nl.yml
170
167
  - web/locales/pl.yml
@@ -175,6 +172,7 @@ files:
175
172
  - web/locales/ta.yml
176
173
  - web/locales/uk.yml
177
174
  - web/locales/ur.yml
175
+ - web/locales/vi.yml
178
176
  - web/locales/zh-cn.yml
179
177
  - web/locales/zh-tw.yml
180
178
  - web/views/_footer.erb
@@ -188,6 +186,8 @@ files:
188
186
  - web/views/dashboard.erb
189
187
  - web/views/dead.erb
190
188
  - web/views/layout.erb
189
+ - web/views/metrics.erb
190
+ - web/views/metrics_for_job.erb
191
191
  - web/views/morgue.erb
192
192
  - web/views/queue.erb
193
193
  - web/views/queues.erb
@@ -195,11 +195,35 @@ files:
195
195
  - web/views/retry.erb
196
196
  - web/views/scheduled.erb
197
197
  - web/views/scheduled_job_info.erb
198
- homepage: http://sidekiq.org
198
+ homepage: https://sidekiq.org
199
199
  licenses:
200
200
  - LGPL-3.0
201
- metadata: {}
202
- post_install_message:
201
+ metadata:
202
+ homepage_uri: https://sidekiq.org
203
+ bug_tracker_uri: https://github.com/mperham/sidekiq/issues
204
+ documentation_uri: https://github.com/mperham/sidekiq/wiki
205
+ changelog_uri: https://github.com/mperham/sidekiq/blob/main/Changes.md
206
+ source_code_uri: https://github.com/mperham/sidekiq
207
+ post_install_message: |2
208
+
209
+ ####################################################
210
+
211
+
212
+ █████████ █████ ██████████ ██████████ █████ ████ █████ ██████ ██████████ █████
213
+ ███░░░░░███░░███ ░░███░░░░███ ░░███░░░░░█░░███ ███░ ░░███ ███░░░░███ ░███░░░░███ ███░░░███
214
+ ░███ ░░░ ░███ ░███ ░░███ ░███ █ ░ ░███ ███ ░███ ███ ░░███ ░░░ ███ ███ ░░███
215
+ ░░█████████ ░███ ░███ ░███ ░██████ ░███████ ░███ ░███ ░███ ███ ░███ ░███
216
+ ░░░░░░░░███ ░███ ░███ ░███ ░███░░█ ░███░░███ ░███ ░███ ██░███ ███ ░███ ░███
217
+ ███ ░███ ░███ ░███ ███ ░███ ░ █ ░███ ░░███ ░███ ░░███ ░░████ ███ ░░███ ███
218
+ ░░█████████ █████ ██████████ ██████████ █████ ░░████ █████ ░░░██████░██ ███ ██ ░░░█████░
219
+ ░░░░░░░░░ ░░░░░ ░░░░░░░░░░ ░░░░░░░░░░ ░░░░░ ░░░░ ░░░░░ ░░░░░░ ░░ ░░░ ░░ ░░░░░░
220
+
221
+
222
+ 1. Use `gem 'sidekiq', '<7'` in your Gemfile if you don't want this new version.
223
+ 2. Read the release notes at https://github.com/mperham/sidekiq/blob/main/docs/7.0-Upgrade.md
224
+ 3. Search for open/closed issues at https://github.com/mperham/sidekiq/issues/
225
+
226
+ ####################################################
203
227
  rdoc_options: []
204
228
  require_paths:
205
229
  - lib
@@ -207,15 +231,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
207
231
  requirements:
208
232
  - - ">="
209
233
  - !ruby/object:Gem::Version
210
- version: 2.5.0
234
+ version: 2.7.0
211
235
  required_rubygems_version: !ruby/object:Gem::Requirement
212
236
  requirements:
213
237
  - - ">="
214
238
  - !ruby/object:Gem::Version
215
239
  version: '0'
216
240
  requirements: []
217
- rubygems_version: 3.0.3
218
- signing_key:
241
+ rubygems_version: 3.2.32
242
+ signing_key:
219
243
  specification_version: 4
220
244
  summary: Simple, efficient background processing for Ruby
221
245
  test_files: []
data/.circleci/config.yml DELETED
@@ -1,82 +0,0 @@
1
- version: 2
2
- references:
3
- unit: &unit
4
- run:
5
- name: Run test suite
6
- command: bundle exec rake
7
- restore: &restore
8
- restore_cache:
9
- keys:
10
- - v1-dependencies-{{ checksum "Gemfile.lock" }}
11
- # fallback to using the latest cache if no exact match is found
12
- - v1-dependencies-
13
- bundle: &bundle
14
- run:
15
- name: install dependencies
16
- command: |
17
- bundle install --jobs=4 --retry=3 --path vendor/bundle
18
- save: &save
19
- save_cache:
20
- paths:
21
- - ./vendor/bundle
22
- key: v1-dependencies-{{ checksum "Gemfile.lock" }}
23
- jobs:
24
- "ruby-2.5":
25
- docker:
26
- - image: circleci/ruby:2.5
27
- - image: circleci/redis:4.0
28
- steps:
29
- - checkout
30
- - <<: *restore
31
- - <<: *bundle
32
- - <<: *save
33
- - <<: *unit
34
- "ruby-2.6":
35
- environment:
36
- COVERAGE: true
37
- CC_TEST_REPORTER_ID: 003c3033501d70a2653bd887ff9a8b2884a263e6a4e27f2ba68748e15530918d
38
- docker:
39
- - image: circleci/ruby:2.6
40
- - image: circleci/redis:4.0
41
- steps:
42
- - checkout
43
- - <<: *restore
44
- - <<: *bundle
45
- - <<: *save
46
-
47
- - run:
48
- name: Setup Code Climate test-reporter
49
- command: |
50
- # download test reporter as a static binary
51
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
52
- chmod +x ./cc-test-reporter
53
-
54
- - run:
55
- name: Code Climate before-build
56
- command: |
57
- ./cc-test-reporter before-build
58
-
59
- - <<: *unit
60
-
61
- - run:
62
- name: Report code coverage to Code Climate
63
- command: |
64
- ./cc-test-reporter after-build -t simplecov --exit-code $?
65
- "jruby":
66
- docker:
67
- - image: circleci/jruby:latest
68
- - image: circleci/redis:4.0
69
- steps:
70
- - checkout
71
- - <<: *restore
72
- - <<: *bundle
73
- - <<: *save
74
- - <<: *unit
75
-
76
- workflows:
77
- version: 2
78
- build:
79
- jobs:
80
- - "ruby-2.5"
81
- - "ruby-2.6"
82
- - "jruby"
@@ -1,32 +0,0 @@
1
- # Contributing
2
-
3
- ## Issues
4
-
5
- When opening an issue:
6
-
7
- * include the full **backtrace** with your error
8
- * include your Sidekiq initializer
9
- * list versions you are using: Ruby, Rails, Sidekiq, OS, etc.
10
-
11
- It's always better to include more info rather than less.
12
-
13
- ## Code
14
-
15
- It's always best to open an issue before investing a lot of time into a
16
- fix or new functionality. Functionality must meet my design goals and
17
- vision for the project to be accepted; I would be happy to discuss how
18
- your idea can best fit into Sidekiq.
19
-
20
- ## Legal
21
-
22
- By submitting a Pull Request, you disavow any rights or claims to any changes
23
- submitted to the Sidekiq project and assign the copyright of
24
- those changes to Contributed Systems LLC.
25
-
26
- If you cannot or do not want to reassign those rights (your employment
27
- contract for your employer may not allow this), you should not submit a PR.
28
- Open an issue and someone else can do the work.
29
-
30
- This is a legal way of saying "If you submit a PR to us, that code becomes ours".
31
- 99.9% of the time that's what you intend anyways; we hope it doesn't scare you
32
- away from contributing.
@@ -1,11 +0,0 @@
1
- Ruby version:
2
- Sidekiq / Pro / Enterprise version(s):
3
-
4
- Please include your initializer and any error message with the full backtrace.
5
-
6
- Are you using an old version?
7
- Have you checked the changelogs to see if your issue has been fixed in a later version?
8
-
9
- https://github.com/mperham/sidekiq/blob/master/Changes.md
10
- https://github.com/mperham/sidekiq/blob/master/Pro-Changes.md
11
- https://github.com/mperham/sidekiq/blob/master/Ent-Changes.md
data/.gitignore DELETED
@@ -1,13 +0,0 @@
1
- .rvmrc
2
- .ruby-version
3
- tags
4
- *.swp
5
- dump.rdb
6
- .rbx
7
- coverage/
8
- vendor/
9
- .bundle/
10
- .sass-cache/
11
- tmp/
12
- pkg/*.gem
13
- .byebug_history
data/.standard.yml DELETED
@@ -1,20 +0,0 @@
1
- ruby_version: 2.5.0
2
- fix: false
3
- parallel: true
4
- ignore:
5
- - test/**/*
6
- - examples/**/*
7
- - myapp/**/*
8
- - 'lib/sidekiq.rb':
9
- - Lint/InheritException
10
- - 'lib/sidekiq/extensions/**/*':
11
- - Style/MethodMissingSuper
12
- - Style/MissingRespondToMissing
13
- - 'lib/**/*':
14
- - Naming/AsciiIdentifiers
15
- - Lint/RescueException
16
- - Security/YAMLLoad
17
- - Naming/AccessorMethodName
18
- - Naming/MethodName
19
- - Style/GlobalVars
20
- - Style/Alias
data/3.0-Upgrade.md DELETED
@@ -1,70 +0,0 @@
1
- # Upgrading to Sidekiq 3.0
2
-
3
- Sidekiq 3.0 brings several new features but also removes old APIs and
4
- changes a few data elements in Redis. To upgrade cleanly:
5
-
6
- * Upgrade to the latest Sidekiq 2.x and run it for a few weeks.
7
- `gem 'sidekiq', '< 3'`
8
- This is only needed if you have retries pending.
9
- * 3rd party gems which use **client-side middleware** will need to update
10
- due to an API change. The Redis connection for a particular job is
11
- passed thru the middleware to handle sharding where jobs can
12
- be pushed to different redis server instances.
13
-
14
- `def call(worker_class, msg, queue, redis_pool)`
15
-
16
- Client-side middleware should use `redis_pool.with { |conn| ... }` to
17
- perform Redis operations and **not** `Sidekiq.redis`.
18
- * If you used the capistrano integration, you'll need to pull in the
19
- new [capistrano-sidekiq](https://github.com/seuros/capistrano-sidekiq)
20
- gem and use it in your deploy.rb.
21
- * API changes:
22
- - `Sidekiq::Client.registered_workers` replaced by `Sidekiq::Workers.new`
23
- - `Sidekiq::Client.registered_queues` replaced by `Sidekiq::Queue.all`
24
- - `Sidekiq::Worker#retries_exhausted` replaced by `Sidekiq::Worker.sidekiq_retries_exhausted`
25
- - `Sidekiq::Workers#each` has changed significantly with a reworking
26
- of Sidekiq's internal process/thread data model.
27
- * `sidekiq/api` is no longer automatically required. If your code uses
28
- the API, you will need to require it.
29
- * Redis-to-Go is no longer transparently activated on Heroku so as to not play
30
- favorites with any particular Redis service. You need to set a config option
31
- for your app:
32
- `heroku config:set REDIS_PROVIDER=REDISTOGO_URL`. You may also use
33
- the generic `REDIS_URL`. See
34
- [Advanced Options: Setting the Location of your Redis server][1]
35
- for details.
36
- * Anyone using Airbrake, Honeybadger, Exceptional or ExceptionNotifier
37
- will need to update their error gem version to the latest to pull in
38
- Sidekiq support. Sidekiq will not provide explicit support for these
39
- services so as to not play favorites with any particular error service.
40
- * MRI 1.9 is no longer officially supported. Sidekiq's official
41
- support policy is to support the current and previous major releases
42
- of MRI and Rails. As of February 2014, that's MRI 2.1, MRI 2.0, JRuby 1.7, Rails 4.0
43
- and Rails 3.2. I will consider PRs to fix issues found by users for
44
- other platforms/versions.
45
-
46
- ## Error Service Providers
47
-
48
- If you previously provided a middleware to capture job errors, you
49
- should instead provide a global error handler with Sidekiq 3.0. This
50
- ensures **any** error within Sidekiq will be logged appropriately, not
51
- just during job execution.
52
-
53
- ```ruby
54
- if Sidekiq::VERSION < '3'
55
- # old behavior
56
- Sidekiq.configure_server do |config|
57
- config.server_middleware do |chain|
58
- chain.add MyErrorService::Middleware
59
- end
60
- end
61
- else
62
- Sidekiq.configure_server do |config|
63
- config.error_handlers << proc {|ex,context| MyErrorService.notify(ex, context) }
64
- end
65
- end
66
- ```
67
-
68
- Your error handler must respond to `call(exception, context_hash)`.
69
-
70
- [1]: https://github.com/mperham/sidekiq/wiki/Advanced-Options#via-env-variable
data/4.0-Upgrade.md DELETED
@@ -1,53 +0,0 @@
1
- # Welcome to Sidekiq 4.0!
2
-
3
- Sidekiq 4.0 contains a redesigned, more efficient core with less overhead per job.
4
- See my blog for [an overview of Sidekiq 4's higher performance](http://www.mikeperham.com/2015/10/14/optimizing-sidekiq/).
5
-
6
- ## What's New
7
-
8
- * Sidekiq no longer uses Celluloid. If your application code uses Celluloid,
9
- you will need to pull it in yourself.
10
-
11
- * `redis-namespace` has been removed from Sidekiq's gem dependencies. If
12
- you want to use namespacing ([and I strongly urge you not to](http://www.mikeperham.com/2015/09/24/storing-data-with-redis/)), you'll need to add the gem to your Gemfile:
13
- ```ruby
14
- gem 'redis-namespace'
15
- ```
16
-
17
- * **Redis 2.8.0 or greater is required.** Redis 2.8 was released two years
18
- ago and contains **many** useful features which Sidekiq couldn't
19
- leverage until now. **Redis 3.0.3 or greater is recommended** for large
20
- scale use [#2431](https://github.com/mperham/sidekiq/issues/2431).
21
-
22
- * Jobs are now fetched from Redis in parallel, making Sidekiq more
23
- resilient to high network latency. This means that Sidekiq requires
24
- more Redis connections per process. You must have a minimum of
25
- `concurrency + 2` connections in your pool or Sidekiq will exit.
26
- When in doubt, let Sidekiq size the connection pool for you.
27
-
28
- * Worker data is no longer updated in real-time but rather upon every
29
- heartbeat. Don't expect the `Sidekiq::Workers` API to be millisecond-precise.
30
-
31
- * There's a new testing API based off the `Sidekiq::Queues` namespace. All
32
- assertions made against the Worker class still work as expected.
33
- ```ruby
34
- assert_equal 0, Sidekiq::Queues["default"].size
35
- HardWorker.perform_async("log")
36
- assert_equal 1, Sidekiq::Queues["default"].size
37
- assert_equal "log", Sidekiq::Queues["default"].first['args'][0]
38
- Sidekiq::Queues.clear_all
39
- ```
40
-
41
- ## Upgrade
42
-
43
- First, make sure you are using Redis 2.8 or greater. Next:
44
-
45
- * Upgrade to the latest Sidekiq 3.x.
46
- ```ruby
47
- gem 'sidekiq', '< 4'
48
- ```
49
- * Fix any deprecation warnings you see.
50
- * Upgrade to 4.x.
51
- ```ruby
52
- gem 'sidekiq', '< 5'
53
- ```
data/5.0-Upgrade.md DELETED
@@ -1,56 +0,0 @@
1
- # Welcome to Sidekiq 5.0!
2
-
3
- Sidekiq 5.0 contains a reworked job dispatch and execution core to integrate
4
- better with the new Rails 5.0 Executor. It also drops support for older
5
- versions of Ruby and Rails and adds support for RTL languages in the Web UI.
6
-
7
- ## What's New
8
-
9
- * Integrate job logging and retry logic directly in with the job
10
- execution logic in Sidekiq::Processor. Previously this logic was
11
- defined as middleware. In Rails 5.0, ActiveSupport::Executor handles ActiveRecord
12
- connection management, job callbacks, development mode class loading,
13
- etc. Because of its extensive responsibilities, the Executor can't be
14
- integrated as Sidekiq middleware; the logging/retry logic had to be pulled out
15
- too. Sidekiq 4.2 had a hack to make it work but this redesign provides
16
- a cleaner integration. [#3235]
17
- * The Delayed Extensions `delay`, `delay_in` and `delay_until` APIs are
18
- no longer available by default. The extensions allow you to marshal
19
- job arguments as YAML, leading to cases where job payloads could be many
20
- 100s of KB or larger if not careful, leading to Redis networking
21
- timeouts or other problems. As noted in the Best Practices wiki page,
22
- Sidekiq is designed for jobs with small, simple arguments.
23
-
24
- Add this line to your initializer to re-enable them and get the old behavior:
25
- ```ruby
26
- Sidekiq::Extensions.enable_delay!
27
- ```
28
- The old `Sidekiq.remove_delay!` API has been removed as it is now the default. [#3299]
29
- * Sidekiq's quiet signal is now `TSTP` (think of it as **T**hread
30
- **ST**o**P**) instead of USR1 as USR1 is not available on JRuby.
31
- USR1 will continue to be supported in Sidekiq 5.x for backwards
32
- compatibility and will be removed in Sidekiq 6.x. [#3302]
33
- * The Web UI is now bi-directional - it can render either LTR
34
- (left-to-right) or RTL languages. With this change, **Farsi, Arabic,
35
- Hebrew and Urdu** are officially supported. [#3381]
36
- * Jobs which can't be parsed due to invalid JSON are now pushed
37
- immediately to the Dead set since they require manual intervention and
38
- will never execute successfully as is. The Web UI has been updated to
39
- more gracefully display these jobs. [#3296]
40
- * **Rails 3.2** is no longer supported.
41
- * **Ruby 2.0 and Ruby 2.1** are no longer supported. Ruby 2.2.2+ is required.
42
-
43
- ## Upgrade
44
-
45
- As always, please upgrade Sidekiq **one major version at a time**.
46
- If you are already running Sidekiq 4.x, then:
47
-
48
- * Upgrade to the latest Sidekiq 4.x.
49
- ```ruby
50
- gem 'sidekiq', '< 5'
51
- ```
52
- * Fix any deprecation warnings you see.
53
- * Upgrade to 5.x.
54
- ```ruby
55
- gem 'sidekiq', '< 6'
56
- ```