sidekiq 4.2.10 → 7.3.10

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.
Files changed (159) hide show
  1. checksums.yaml +5 -5
  2. data/Changes.md +932 -7
  3. data/LICENSE.txt +9 -0
  4. data/README.md +49 -50
  5. data/bin/multi_queue_bench +271 -0
  6. data/bin/sidekiq +22 -3
  7. data/bin/sidekiqload +218 -116
  8. data/bin/sidekiqmon +11 -0
  9. data/lib/active_job/queue_adapters/sidekiq_adapter.rb +75 -0
  10. data/lib/generators/sidekiq/job_generator.rb +59 -0
  11. data/lib/generators/sidekiq/templates/{worker.rb.erb → job.rb.erb} +2 -2
  12. data/lib/generators/sidekiq/templates/job_spec.rb.erb +6 -0
  13. data/lib/generators/sidekiq/templates/{worker_test.rb.erb → job_test.rb.erb} +1 -1
  14. data/lib/sidekiq/api.rb +710 -322
  15. data/lib/sidekiq/capsule.rb +132 -0
  16. data/lib/sidekiq/cli.rb +268 -248
  17. data/lib/sidekiq/client.rb +153 -101
  18. data/lib/sidekiq/component.rb +90 -0
  19. data/lib/sidekiq/config.rb +311 -0
  20. data/lib/sidekiq/deploy.rb +64 -0
  21. data/lib/sidekiq/embedded.rb +63 -0
  22. data/lib/sidekiq/fetch.rb +50 -42
  23. data/lib/sidekiq/iterable_job.rb +55 -0
  24. data/lib/sidekiq/job/interrupt_handler.rb +24 -0
  25. data/lib/sidekiq/job/iterable/active_record_enumerator.rb +53 -0
  26. data/lib/sidekiq/job/iterable/csv_enumerator.rb +47 -0
  27. data/lib/sidekiq/job/iterable/enumerators.rb +135 -0
  28. data/lib/sidekiq/job/iterable.rb +294 -0
  29. data/lib/sidekiq/job.rb +385 -0
  30. data/lib/sidekiq/job_logger.rb +52 -0
  31. data/lib/sidekiq/job_retry.rb +305 -0
  32. data/lib/sidekiq/job_util.rb +109 -0
  33. data/lib/sidekiq/launcher.rb +208 -108
  34. data/lib/sidekiq/logger.rb +131 -0
  35. data/lib/sidekiq/manager.rb +43 -47
  36. data/lib/sidekiq/metrics/query.rb +158 -0
  37. data/lib/sidekiq/metrics/shared.rb +106 -0
  38. data/lib/sidekiq/metrics/tracking.rb +148 -0
  39. data/lib/sidekiq/middleware/chain.rb +113 -56
  40. data/lib/sidekiq/middleware/current_attributes.rb +128 -0
  41. data/lib/sidekiq/middleware/i18n.rb +9 -7
  42. data/lib/sidekiq/middleware/modules.rb +23 -0
  43. data/lib/sidekiq/monitor.rb +147 -0
  44. data/lib/sidekiq/paginator.rb +33 -15
  45. data/lib/sidekiq/processor.rb +188 -98
  46. data/lib/sidekiq/rails.rb +53 -92
  47. data/lib/sidekiq/redis_client_adapter.rb +114 -0
  48. data/lib/sidekiq/redis_connection.rb +86 -77
  49. data/lib/sidekiq/ring_buffer.rb +32 -0
  50. data/lib/sidekiq/scheduled.rb +140 -51
  51. data/lib/sidekiq/sd_notify.rb +149 -0
  52. data/lib/sidekiq/systemd.rb +26 -0
  53. data/lib/sidekiq/testing/inline.rb +6 -5
  54. data/lib/sidekiq/testing.rb +95 -85
  55. data/lib/sidekiq/transaction_aware_client.rb +59 -0
  56. data/lib/sidekiq/version.rb +7 -1
  57. data/lib/sidekiq/web/action.rb +40 -18
  58. data/lib/sidekiq/web/application.rb +189 -89
  59. data/lib/sidekiq/web/csrf_protection.rb +183 -0
  60. data/lib/sidekiq/web/helpers.rb +239 -101
  61. data/lib/sidekiq/web/router.rb +28 -21
  62. data/lib/sidekiq/web.rb +123 -110
  63. data/lib/sidekiq/worker_compatibility_alias.rb +13 -0
  64. data/lib/sidekiq.rb +97 -185
  65. data/sidekiq.gemspec +26 -27
  66. data/web/assets/images/apple-touch-icon.png +0 -0
  67. data/web/assets/javascripts/application.js +157 -61
  68. data/web/assets/javascripts/base-charts.js +106 -0
  69. data/web/assets/javascripts/chart.min.js +13 -0
  70. data/web/assets/javascripts/chartjs-plugin-annotation.min.js +7 -0
  71. data/web/assets/javascripts/dashboard-charts.js +194 -0
  72. data/web/assets/javascripts/dashboard.js +43 -280
  73. data/web/assets/javascripts/metrics.js +298 -0
  74. data/web/assets/stylesheets/application-dark.css +147 -0
  75. data/web/assets/stylesheets/application-rtl.css +163 -0
  76. data/web/assets/stylesheets/application.css +176 -196
  77. data/web/assets/stylesheets/bootstrap-rtl.min.css +9 -0
  78. data/web/assets/stylesheets/bootstrap.css +2 -2
  79. data/web/locales/ar.yml +87 -0
  80. data/web/locales/cs.yml +62 -62
  81. data/web/locales/da.yml +60 -53
  82. data/web/locales/de.yml +65 -53
  83. data/web/locales/el.yml +43 -24
  84. data/web/locales/en.yml +88 -64
  85. data/web/locales/es.yml +70 -53
  86. data/web/locales/fa.yml +65 -64
  87. data/web/locales/fr.yml +82 -62
  88. data/web/locales/gd.yml +98 -0
  89. data/web/locales/he.yml +80 -0
  90. data/web/locales/hi.yml +59 -59
  91. data/web/locales/it.yml +85 -54
  92. data/web/locales/ja.yml +74 -62
  93. data/web/locales/ko.yml +52 -52
  94. data/web/locales/lt.yml +83 -0
  95. data/web/locales/nb.yml +61 -61
  96. data/web/locales/nl.yml +52 -52
  97. data/web/locales/pl.yml +45 -45
  98. data/web/locales/pt-br.yml +82 -55
  99. data/web/locales/pt.yml +51 -51
  100. data/web/locales/ru.yml +68 -63
  101. data/web/locales/sv.yml +53 -53
  102. data/web/locales/ta.yml +60 -60
  103. data/web/locales/tr.yml +100 -0
  104. data/web/locales/uk.yml +85 -61
  105. data/web/locales/ur.yml +80 -0
  106. data/web/locales/vi.yml +83 -0
  107. data/web/locales/zh-cn.yml +42 -16
  108. data/web/locales/zh-tw.yml +41 -8
  109. data/web/views/_footer.erb +20 -3
  110. data/web/views/_job_info.erb +21 -4
  111. data/web/views/_metrics_period_select.erb +12 -0
  112. data/web/views/_nav.erb +5 -19
  113. data/web/views/_paging.erb +3 -1
  114. data/web/views/_poll_link.erb +3 -6
  115. data/web/views/_summary.erb +7 -7
  116. data/web/views/busy.erb +85 -31
  117. data/web/views/dashboard.erb +53 -20
  118. data/web/views/dead.erb +3 -3
  119. data/web/views/filtering.erb +6 -0
  120. data/web/views/layout.erb +17 -6
  121. data/web/views/metrics.erb +90 -0
  122. data/web/views/metrics_for_job.erb +59 -0
  123. data/web/views/morgue.erb +15 -16
  124. data/web/views/queue.erb +35 -25
  125. data/web/views/queues.erb +20 -4
  126. data/web/views/retries.erb +19 -16
  127. data/web/views/retry.erb +3 -3
  128. data/web/views/scheduled.erb +19 -17
  129. metadata +103 -194
  130. data/.github/contributing.md +0 -32
  131. data/.github/issue_template.md +0 -9
  132. data/.gitignore +0 -12
  133. data/.travis.yml +0 -18
  134. data/3.0-Upgrade.md +0 -70
  135. data/4.0-Upgrade.md +0 -53
  136. data/COMM-LICENSE +0 -95
  137. data/Ent-Changes.md +0 -173
  138. data/Gemfile +0 -29
  139. data/LICENSE +0 -9
  140. data/Pro-2.0-Upgrade.md +0 -138
  141. data/Pro-3.0-Upgrade.md +0 -44
  142. data/Pro-Changes.md +0 -628
  143. data/Rakefile +0 -12
  144. data/bin/sidekiqctl +0 -99
  145. data/code_of_conduct.md +0 -50
  146. data/lib/generators/sidekiq/templates/worker_spec.rb.erb +0 -6
  147. data/lib/generators/sidekiq/worker_generator.rb +0 -49
  148. data/lib/sidekiq/core_ext.rb +0 -119
  149. data/lib/sidekiq/exception_handler.rb +0 -31
  150. data/lib/sidekiq/extensions/action_mailer.rb +0 -57
  151. data/lib/sidekiq/extensions/active_record.rb +0 -40
  152. data/lib/sidekiq/extensions/class_methods.rb +0 -40
  153. data/lib/sidekiq/extensions/generic_proxy.rb +0 -25
  154. data/lib/sidekiq/logging.rb +0 -106
  155. data/lib/sidekiq/middleware/server/active_record.rb +0 -13
  156. data/lib/sidekiq/middleware/server/logging.rb +0 -31
  157. data/lib/sidekiq/middleware/server/retry_jobs.rb +0 -205
  158. data/lib/sidekiq/util.rb +0 -63
  159. data/lib/sidekiq/worker.rb +0 -121
data/Changes.md CHANGED
@@ -1,6 +1,931 @@
1
1
  # Sidekiq Changes
2
2
 
3
- HEAD
3
+ [Sidekiq Changes](https://github.com/sidekiq/sidekiq/blob/main/Changes.md) | [Sidekiq Pro Changes](https://github.com/sidekiq/sidekiq/blob/main/Pro-Changes.md) | [Sidekiq Enterprise Changes](https://github.com/sidekiq/sidekiq/blob/main/Ent-Changes.md)
4
+
5
+ 7.3.10
6
+ ----------
7
+
8
+ - Allow Redis :password as a Proc [#6625]
9
+ `config.redis = { password: ->(username) { "password" } }`
10
+ - Bump required redis-client version to 0.23
11
+ - Lock dependencies to known good major versions
12
+
13
+ 7.3.9
14
+ ----------
15
+
16
+ - Only require activejob if necessary [#6584]
17
+ - Fix iterable job cancellation [#6589]
18
+ - Web UI accessibility improvements [#6604]
19
+
20
+ 7.3.8
21
+ ----------
22
+
23
+ - Fix dead tag links [#6554]
24
+ - Massive Web UI performance improvement, some pages up to 15x faster [#6555]
25
+
26
+ 7.3.7
27
+ ----------
28
+
29
+ - Backport `Sidekiq::Web.configure` for compatibility with 8.0 [#6532]
30
+ - Backport `url_params(key)` and `route_params(key)` for compatibility with 8.0 [#6532]
31
+ - Various fixes for UI filtering [#6508]
32
+ - Tune `inspect` for internal S::Components to keep size managable [#6553]
33
+
34
+ 7.3.6
35
+ ----------
36
+
37
+ - Forward compatibility fixes for Ruby 3.4
38
+ - Filtering in the Web UI now works via GET so you can bookmark a filtered view. [#6497]
39
+
40
+ 7.3.5
41
+ ----------
42
+
43
+ - Reimplement `retry_all` and `kill_all` API methods to use ZPOPMIN,
44
+ approximately 30-60% faster. [#6481]
45
+ - Add preload testing binary at `examples/testing/sidekiq_boot` to verify your Rails app boots correctly with Sidekiq Enterprise's app preloading.
46
+ - Fix circular require with ActiveJob adapter [#6477]
47
+ - Fix potential race condition leading to incorrect serialized values for CurrentAttributes [#6475]
48
+ - Restore missing elapsed time when default job logging is disabled
49
+
50
+ 7.3.4
51
+ ----------
52
+
53
+ - Fix FrozenError when starting Sidekiq [#6470]
54
+
55
+ 7.3.3
56
+ ----------
57
+
58
+ - Freeze global configuration once boot is complete, to avoid configuration race conditions [#6466, #6465]
59
+ - Sidekiq now warns if a job iteration takes longer than the `-t` timeout setting (defaults to 25 seconds)
60
+ - Iteration callbacks now have easy access to job arguments via the `arguments` method:
61
+ ```ruby
62
+ def on_stop
63
+ p arguments # => `[123, "string", {"key" => "value"}]`
64
+ id, str, hash = arguments
65
+ end
66
+ ```
67
+ - Iterable jobs can be cancelled via `Sidekiq::Client#cancel!`:
68
+ ```ruby
69
+ c = Sidekiq::Client.new
70
+ jid = c.push("class" => SomeJob, "args" => [123])
71
+ c.cancel!(jid) # => true
72
+ ```
73
+ - Take over support for ActiveJob's `:sidekiq` adapter [#6430, fatkodima]
74
+ - Ensure CurrentAttributes are in scope when creating batch callbacks [#6455]
75
+ - Add `Sidekiq.gem_version` API.
76
+ - Update Ukranian translations
77
+
78
+ 7.3.2
79
+ ----------
80
+
81
+ - Adjust ActiveRecord batch iteration to restart an interrupted batch from the beginning.
82
+ Each batch should be processed as a single transaction in order to be idempotent. [#6405]
83
+ - Fix typo in Sidekiq::DeadSet#kill [#6397]
84
+ - Fix CSS issue with bottom bar in Web UI [#6414]
85
+
86
+ 7.3.1
87
+ ----------
88
+
89
+ - Don't count job interruptions as failures in metrics [#6386]
90
+ - Add frozen string literal to a number of .rb files.
91
+ - Fix frozen string error with style_tag and script_tag [#6371]
92
+ - Fix an error on Ruby 2.7 because of usage of `Hash#except` [#6376]
93
+
94
+ 7.3.0
95
+ ----------
96
+
97
+ - **NEW FEATURE** Add `Sidekiq::IterableJob`, iteration support for long-running jobs. [#6286, fatkodima]
98
+ Iterable jobs are interruptible and can restart quickly if
99
+ running during a deploy. You must ensure that `each_iteration`
100
+ doesn't take more than Sidekiq's `-t` timeout (default: 25 seconds). Iterable jobs must not implement `perform`.
101
+ ```ruby
102
+ class ProcessArrayJob
103
+ include Sidekiq::IterableJob
104
+ def build_enumerator(*args, **kwargs)
105
+ array_enumerator(args, **kwargs)
106
+ end
107
+ def each_iteration(arg)
108
+ puts arg
109
+ end
110
+ end
111
+ ProcessArrayJob.perform_async(1, 2, 3)
112
+ ```
113
+ See the [Iteration](//github.com/sidekiq/sidekiq/wiki/Iteration) wiki page and the RDoc in `Sidekiq::IterableJob`.
114
+ This feature should be considered BETA until the next minor release.
115
+ - **SECURITY** The Web UI no longer allows extensions to use `<script>`.
116
+ Adjust CSP to disallow inline scripts within the Web UI. Please see
117
+ `examples/webui-ext` for how to register Web UI extensions and use
118
+ dynamic CSS and JS. This will make Sidekiq immune to XSS attacks. [#6270]
119
+ - Add config option, `:skip_default_job_logging` to disable Sidekiq's default
120
+ start/finish job logging. [#6200]
121
+ - Allow `Sidekiq::Limiter.redis` to use Redis Cluster [#6288]
122
+ - Retain CurrentAttributeѕ after inline execution [#6307]
123
+ - Ignore non-existent CurrentAttributes attributes when restoring [#6341]
124
+ - Raise default Redis {read,write,connect} timeouts from 1 to 3 seconds
125
+ to minimize ReadTimeoutErrors [#6162]
126
+ - Add `logger` as a dependency since it will become bundled in Ruby 3.5 [#6320]
127
+ - Ignore unsupported locales in the Web UI [#6313]
128
+
129
+ 7.2.4
130
+ ----------
131
+
132
+ - Fix XSS in metrics filtering introduced in 7.2.0, CVE-2024-32887
133
+ Thanks to @UmerAdeemCheema for the security report.
134
+
135
+ 7.2.3
136
+ ----------
137
+
138
+ - [Support Dragonfly.io](https://www.mikeperham.com/2024/02/01/supporting-dragonfly/) as an alternative Redis implementation
139
+ - Fix error unpacking some compressed error backtraces [#6241]
140
+ - Fix potential heartbeat data leak [#6227]
141
+ - Add ability to find a currently running work by jid [#6212, fatkodima]
142
+
143
+ 7.2.2
144
+ ----------
145
+
146
+ - Add `Process.warmup` call in Ruby 3.3+
147
+ - Batch jobs now skip transactional push [#6160]
148
+
149
+ 7.2.1
150
+ ----------
151
+
152
+ - Add `Sidekiq::Work` type which replaces the raw Hash as the third parameter in
153
+ `Sidekiq::WorkSet#each { |pid, tid, hash| ... }` [#6145]
154
+ - **DEPRECATED**: direct access to the attributes within the `hash` block parameter above.
155
+ The `Sidekiq::Work` instance contains accessor methods to get at the same data, e.g.
156
+ ```ruby
157
+ work["queue"] # Old
158
+ work.queue # New
159
+ ```
160
+ - Fix Ruby 3.3 warnings around `base64` gem [#6151, earlopain]
161
+
162
+ 7.2.0
163
+ ----------
164
+
165
+ - `sidekiq_retries_exhausted` can return `:discard` to avoid the deadset
166
+ and all death handlers [#6091]
167
+ - Metrics filtering by job class in Web UI [#5974]
168
+ - Better readability and formatting for numbers within the Web UI [#6080]
169
+ - Add explicit error if user code tries to nest test modes [#6078]
170
+ ```ruby
171
+ Sidekiq::Testing.inline! # global setting
172
+ Sidekiq::Testing.fake! do # override within block
173
+ # ok
174
+ Sidekiq::Testing.inline! do # can't override the override
175
+ # not ok, nested
176
+ end
177
+ end
178
+ ```
179
+ - **SECURITY** Forbid inline JavaScript execution in Web UI [#6074]
180
+ - Adjust redis-client adapter to avoid `method_missing` [#6083]
181
+ This can result in app code breaking if your app's Redis API usage was
182
+ depending on Sidekiq's adapter to correct invalid redis-client API usage.
183
+ One example:
184
+ ```ruby
185
+ # bad, not redis-client native
186
+ # Unsupported command argument type: TrueClass (TypeError)
187
+ Sidekiq.redis { |c| c.set("key", "value", nx: true, ex: 15) }
188
+ # good
189
+ Sidekiq.redis { |c| c.set("key", "value", "nx", "ex", 15) }
190
+ ```
191
+
192
+ 7.1.6
193
+ ----------
194
+
195
+ - The block forms of testing modes (inline, fake) are now thread-safe so you can have
196
+ a multithreaded test suite which uses different modes for different tests. [#6069]
197
+ - Fix breakage with non-Proc error handlers [#6065]
198
+
199
+ 7.1.5
200
+ ----------
201
+
202
+ - **FEATURE**: Job filtering within the Web UI. This feature has been open
203
+ sourced from Sidekiq Pro. [#6052]
204
+ - **API CHANGE** Error handlers now take three arguments `->(ex, context, config)`.
205
+ The previous calling convention will work until Sidekiq 8.0 but will print
206
+ out a deprecation warning. [#6051]
207
+ - Fix issue with the `batch_size` and `at` options in `S::Client.push_bulk` [#6040]
208
+ - Fix inline testing firing batch callbacks early [#6057]
209
+ - Use new log broadcast API in Rails 7.1 [#6054]
210
+ - Crash if user tries to use RESP2 `protocol: 2` [#6061]
211
+
212
+ 7.1.4
213
+ ----------
214
+
215
+ - Fix empty `retry_for` logic [#6035]
216
+
217
+ 7.1.3
218
+ ----------
219
+
220
+ - Add `sidekiq_options retry_for: 48.hours` to allow time-based retry windows [#6029]
221
+ - Support sidekiq_retry_in and sidekiq_retries_exhausted_block in ActiveJobs (#5994)
222
+ - Lowercase all Rack headers for Rack 3.0 [#5951]
223
+ - Validate Sidekiq::Web page refresh delay to avoid potential DoS,
224
+ CVE-2023-26141, thanks for reporting Keegan!
225
+
226
+ 7.1.2
227
+ ----------
228
+
229
+ - Mark Web UI assets as private so CDNs won't cache them [#5936]
230
+ - Fix stackoverflow when using Oj and the JSON log formatter [#5920]
231
+ - Remove spurious `enqueued_at` from scheduled ActiveJobs [#5937]
232
+
233
+ 7.1.1
234
+ ----------
235
+
236
+ - Support multiple CurrentAttributes [#5904]
237
+ - Speed up latency fetch with large queues on Redis <7 [#5910]
238
+ - Allow a larger default client pool [#5886]
239
+ - Ensure Sidekiq.options[:environment] == RAILS_ENV [#5932]
240
+
241
+ 7.1.0
242
+ ----------
243
+
244
+ - Improve display of ActiveJob arguments in Web UI [#5825, cover]
245
+ - Update `push_bulk` to push `batch_size` jobs at a time and allow laziness [#5827, fatkodima]
246
+ This allows Sidekiq::Client to push unlimited jobs as long as it has enough memory for the batch_size.
247
+ - Update `perform_bulk` to use `push_bulk` internally.
248
+ - Change return value of `push_bulk` to map 1-to-1 with arguments.
249
+ If you call `push_bulk(args: [[1], [2], [3]])`, you will now always get
250
+ an array of 3 values as the result: `["jid1", nil, "jid3"]` where nil means
251
+ that particular job did not push successfully (possibly due to middleware
252
+ stopping it). Previously nil values were removed so it was impossible to tell
253
+ which jobs pushed successfully and which did not.
254
+ - Migrate away from all deprecated Redis commands [#5788]
255
+ Sidekiq will now print a warning if you use one of those deprecated commands.
256
+ - Prefix all Sidekiq thread names [#5872]
257
+
258
+ 7.0.9
259
+ ----------
260
+
261
+ - Restore confirmation dialogs in Web UI [#5881, shevaun]
262
+ - Increase fetch timeout to minimize ReadTimeoutError [#5874]
263
+ - Reverse histogram tooltip ordering [#5868]
264
+ - Add Scottish Gaelic (gd) locale [#5867, GunChleoc]
265
+
266
+ 7.0.8
267
+ ----------
268
+
269
+ - **SECURITY** Sanitize `period` input parameter on Metrics pages.
270
+ Specially crafted values can lead to XSS. This functionality
271
+ was introduced in 7.0.4. Thank you to spercex @ huntr.dev [#5694]
272
+ - Add job hash as 3rd parameter to the `sidekiq_retry_in` block.
273
+
274
+ 7.0.7
275
+ ----------
276
+
277
+ - Fix redis-client API usage which could result in stuck Redis
278
+ connections [#5823]
279
+ - Fix AS::Duration with `sidekiq_retry_in` [#5806]
280
+ - Restore dumping config options on startup with `-v` [#5822]
281
+
282
+ 7.0.5,7.0.6
283
+ ----------
284
+
285
+ - More context for debugging json unsafe errors [#5787]
286
+
287
+ 7.0.4
288
+ ----------
289
+
290
+ - Performance and memory optimizations [#5768, fatkodima]
291
+ - Add 1-8 hour period selector to Metrics pages [#5694]
292
+ - Fix process display with `sidekiqmon` [#5733]
293
+
294
+ 7.0.3
295
+ ----------
296
+
297
+ - Don't warn about memory policy on Redis Enterprise [#5712]
298
+ - Don't allow Quiet/Stop on embedded Sidekiq instances [#5716]
299
+ - Fix `size: X` for configuring the default Redis pool size [#5702]
300
+ - Improve the display of queue weights on Busy page [#5642]
301
+ - Freeze CurrentAttributes on a job once initially set [#5692]
302
+
303
+ 7.0.2
304
+ ----------
305
+
306
+ - Improve compatibility with custom loggers [#5673]
307
+ - Add queue weights on Busy page [#5640]
308
+ - Add BID link on job_info page if job is part of a Batch [#5623]
309
+ - Allow custom extensions to add rows/links within Job detail pages [#5624]
310
+ ```ruby
311
+ Sidekiq::Web.custom_job_info_rows << AddAccountLink.new
312
+
313
+ class AddAccountLink
314
+ include CGI::Util
315
+ def add_pair(job)
316
+ # yield a (name, value) pair
317
+ # You can include HTML tags and CSS, Sidekiq does not do any
318
+ # escaping so beware user data injection! Note how we use CGI's
319
+ # `h` escape helper.
320
+ aid = job["account_id"]
321
+ yield "Account", "<a href='/accounts/#{h aid}'>#{h aid}</a>" if aid
322
+ end
323
+ end
324
+ ```
325
+
326
+ 7.0.1
327
+ ----------
328
+
329
+ - Allow an embedding process to reuse its own heartbeat thread
330
+ - Update zh-cn localization
331
+
332
+ 7.0.0
333
+ ----------
334
+
335
+ - Embedded mode!
336
+ - Capsules!!
337
+ - Job Execution metrics!!!
338
+ - See `docs/7.0-Upgrade.md` for release notes
339
+
340
+ 6.5.{10,11,12}
341
+ ----------
342
+
343
+ - Fixes for Rails 7.1 [#6067, #6070]
344
+
345
+ 6.5.9
346
+ ----------
347
+
348
+ - Ensure Sidekiq.options[:environment] == RAILS_ENV [#5932]
349
+
350
+ 6.5.8
351
+ ----------
352
+
353
+ - Fail if using a bad version of scout_apm [#5616]
354
+ - Add pagination to Busy page [#5556]
355
+ - Speed up WorkSet#each [#5559]
356
+ - Adjust CurrentAttributes to work with the String class name so we aren't referencing the Class within a Rails initializer [#5536]
357
+
358
+ 6.5.7
359
+ ----------
360
+
361
+ - Updates for JA and ZH locales
362
+ - Further optimizations for scheduled polling [#5513]
363
+
364
+ 6.5.6
365
+ ----------
366
+
367
+ - Fix deprecation warnings with redis-rb 4.8.0 [#5484]
368
+ - Lock redis-rb to < 5.0 as we are moving to redis-client in Sidekiq 7.0
369
+
370
+ 6.5.5
371
+ ----------
372
+
373
+ - Fix require issue with job_retry.rb [#5462]
374
+ - Improve Sidekiq::Web compatibility with Rack 3.x
375
+
376
+ 6.5.4
377
+ ----------
378
+
379
+ - Fix invalid code on Ruby 2.5 [#5460]
380
+ - Fix further metrics dependency issues [#5457]
381
+
382
+ 6.5.3
383
+ ----------
384
+
385
+ - Don't require metrics code without explicit opt-in [#5456]
386
+
387
+ 6.5.2
388
+ ----------
389
+
390
+ - [Job Metrics are under active development, help wanted!](https://github.com/sidekiq/sidekiq/wiki/Metrics#contributing) **BETA**
391
+ - Add `Context` column on queue page which shows any CurrentAttributes [#5450]
392
+ - `sidekiq_retry_in` may now return `:discard` or `:kill` to dynamically stop job retries [#5406]
393
+ - Smarter sorting of processes in /busy Web UI [#5398]
394
+ - Fix broken hamburger menu in mobile UI [#5428]
395
+ - Require redis-rb 4.5.0. Note that Sidekiq will break if you use the
396
+ [`Redis.exists_returns_integer = false`](https://github.com/redis/redis-rb/blob/master/CHANGELOG.md#450) flag. [#5394]
397
+
398
+ 6.5.1
399
+ ----------
400
+
401
+ - Fix `push_bulk` breakage [#5387]
402
+
403
+ 6.5.0
404
+ ---------
405
+
406
+ - Substantial refactoring of Sidekiq server internals, part of a larger effort
407
+ to reduce Sidekiq's internal usage of global methods and data, see [docs/global_to_local.md](docs/global_to_local.md) and [docs/middleware.md](docs/middleware.md).
408
+ - **Add beta support for the `redis-client` gem**. This will become the default Redis driver in Sidekiq 7.0. [#5298]
409
+ Read more: https://github.com/sidekiq/sidekiq/wiki/Using-redis-client
410
+ - **Add beta support for DB transaction-aware client** [#5291]
411
+ Add this line to your initializer and any jobs created during a transaction
412
+ will only be pushed to Redis **after the transaction commits**. You will need to add the
413
+ `after_commit_everywhere` gem to your Gemfile.
414
+ ```ruby
415
+ Sidekiq.transactional_push!
416
+ ```
417
+ This feature does not have a lot of production usage yet; please try it out and let us
418
+ know if you have any issues. It will be fully supported in Sidekiq 7.0 or removed if it
419
+ proves problematic.
420
+ - Fix regression with middleware arguments [#5312]
421
+
422
+ 6.4.2
423
+ ---------
424
+
425
+ - Strict argument checking now runs after client-side middleware [#5246]
426
+ - Fix page events with live polling [#5184]
427
+ - Many under-the-hood changes to remove all usage of the term "worker"
428
+ from the Sidekiq codebase and APIs. This mostly involved RDoc and local
429
+ variable names but a few constants and public APIs were changed. The old
430
+ APIs will be removed in Sidekiq 7.0.
431
+ ```
432
+ Sidekiq::DEFAULT_WORKER_OPTIONS -> Sidekiq.default_job_options
433
+ Sidekiq.default_worker_options -> Sidekiq.default_job_options
434
+ Sidekiq::Queues["default"].jobs_by_worker(HardJob) -> Sidekiq::Queues["default"].jobs_by_class(HardJob)
435
+ ```
436
+
437
+ 6.4.1
438
+ ---------
439
+
440
+ - Fix pipeline/multi deprecations in redis-rb 4.6
441
+ - Fix sidekiq.yml YAML load errors on Ruby 3.1 [#5141]
442
+ - Sharding support for `perform_bulk` [#5129]
443
+ - Refactor job logger for SPEEEEEEED
444
+
445
+ 6.4.0
446
+ ---------
447
+
448
+ - **SECURITY**: Validate input to avoid possible DoS in Web UI.
449
+ - Add **strict argument checking** [#5071]
450
+ Sidekiq will now log a warning if JSON-unsafe arguments are passed to `perform_async`.
451
+ Add `Sidekiq.strict_args!(false)` to your initializer to disable this warning.
452
+ This warning will switch to an exception in Sidekiq 7.0.
453
+ - Note that Delayed Extensions will be removed in Sidekiq 7.0 [#5076]
454
+ - Add `perform_{inline,sync}` in Sidekiq::Job to run a job synchronously [#5061, hasan-ally]
455
+ ```ruby
456
+ SomeJob.perform_async(args...)
457
+ SomeJob.perform_sync(args...)
458
+ SomeJob.perform_inline(args...)
459
+ ```
460
+ You can also dynamically redirect a job to run synchronously:
461
+ ```ruby
462
+ SomeJob.set("sync": true).perform_async(args...) # will run via perform_inline
463
+ ```
464
+ - Replace Sidekiq::Worker `app/workers` generator with Sidekiq::Job `app/sidekiq` generator [#5055]
465
+ ```
466
+ bin/rails generate sidekiq:job ProcessOrderJob
467
+ ```
468
+ - Fix job retries losing CurrentAttributes [#5090]
469
+ - Tweak shutdown to give long-running threads time to cleanup [#5095]
470
+
471
+ 6.3.1
472
+ ---------
473
+
474
+ - Fix keyword arguments error with CurrentAttributes on Ruby 3.0 [#5048]
475
+
476
+ 6.3.0
477
+ ---------
478
+
479
+ - **BREAK**: The Web UI has been refactored to remove jQuery. Any UI extensions
480
+ which use jQuery will break.
481
+ - **FEATURE**: Sidekiq.logger has been enhanced so any `Rails.logger`
482
+ output in jobs now shows up in the Sidekiq console. Remove any logger
483
+ hacks in your initializer and see if it Just Works™ now. [#5021]
484
+ - **FEATURE**: Add `Sidekiq::Job` alias for `Sidekiq::Worker`, to better
485
+ reflect industry standard terminology. You can now do this:
486
+ ```ruby
487
+ class MyJob
488
+ include Sidekiq::Job
489
+ sidekiq_options ...
490
+ def perform(args)
491
+ end
492
+ end
493
+ ```
494
+ - **FEATURE**: Support for serializing ActiveSupport::CurrentAttributes into each job. [#4982]
495
+ ```ruby
496
+ # config/initializers/sidekiq.rb
497
+ require "sidekiq/middleware/current_attributes"
498
+ Sidekiq::CurrentAttributes.persist(Myapp::Current) # Your AS::CurrentAttributes singleton
499
+ ```
500
+ - **FEATURE**: Add `Sidekiq::Worker.perform_bulk` for enqueuing jobs in bulk,
501
+ similar to `Sidekiq::Client.push_bulk` [#5042]
502
+ ```ruby
503
+ MyJob.perform_bulk([[1], [2], [3]])
504
+ ```
505
+ - Implement `queue_as`, `wait` and `wait_until` for ActiveJob compatibility [#5003]
506
+ - Scheduler now uses Lua to reduce Redis load and network roundtrips [#5044]
507
+ - Retry Redis operation if we get an `UNBLOCKED` Redis error [#4985]
508
+ - Run existing signal traps, if any, before running Sidekiq's trap [#4991]
509
+ - Fix fetch bug when using weighted queues which caused Sidekiq to stop
510
+ processing queues randomly [#5031]
511
+
512
+ 6.2.2
513
+ ---------
514
+
515
+ - Reduce retry jitter, add jitter to `sidekiq_retry_in` values [#4957]
516
+ - Minimize scheduler load on Redis at scale [#4882]
517
+ - Improve logging of delay jobs [#4904, BuonOno]
518
+ - Minor CSS improvements for buttons and tables, design PRs always welcome!
519
+ - Tweak Web UI `Cache-Control` header [#4966]
520
+ - Rename internal API class `Sidekiq::Job` to `Sidekiq::JobRecord` [#4955]
521
+
522
+ 6.2.1
523
+ ---------
524
+
525
+ - Update RTT warning logic to handle transient RTT spikes [#4851]
526
+ - Fix very low priority CVE on unescaped queue name [#4852]
527
+ - Add note about sessions and Rails apps in API mode
528
+
529
+ 6.2.0
530
+ ---------
531
+
532
+ - Store Redis RTT and log if poor [#4824]
533
+ - Add process/thread stats to Busy page [#4806]
534
+ - Improve Web UI on mobile devices [#4840]
535
+ - **Refactor Web UI session usage** [#4804]
536
+ Numerous people have hit "Forbidden" errors and struggled with Sidekiq's
537
+ Web UI session requirement. If you have code in your initializer for
538
+ Web sessions, it's quite possible it will need to be removed. Here's
539
+ an overview:
540
+ ```
541
+ Sidekiq::Web needs a valid Rack session for CSRF protection. If this is a Rails app,
542
+ make sure you mount Sidekiq::Web *inside* your routes in `config/routes.rb` so
543
+ Sidekiq can reuse the Rails session:
544
+
545
+ Rails.application.routes.draw do
546
+ mount Sidekiq::Web => "/sidekiq"
547
+ ....
548
+ end
549
+
550
+ If this is a bare Rack app, use a session middleware before Sidekiq::Web:
551
+
552
+ # first, use IRB to create a shared secret key for sessions and commit it
553
+ require 'securerandom'; File.open(".session.key", "w") {|f| f.write(SecureRandom.hex(32)) }
554
+
555
+ # now, update your Rack app to include the secret with a session cookie middleware
556
+ use Rack::Session::Cookie, secret: File.read(".session.key"), same_site: true, max_age: 86400
557
+ run Sidekiq::Web
558
+
559
+ If this is a Rails app in API mode, you need to enable sessions.
560
+
561
+ https://guides.rubyonrails.org/api_app.html#using-session-middlewares
562
+ ```
563
+
564
+ 6.1.3
565
+ ---------
566
+
567
+ - Warn if Redis is configured to evict data under memory pressure [#4752]
568
+ - Add process RSS on the Busy page [#4717]
569
+
570
+ 6.1.2
571
+ ---------
572
+
573
+ - Improve readability in dark mode Web UI [#4674]
574
+ - Fix Web UI crash with corrupt session [#4672]
575
+ - Allow middleware to yield arguments [#4673, @eugeneius]
576
+ - Migrate CI from CircleCI to GitHub Actions [#4677]
577
+
578
+ 6.1.1
579
+ ---------
580
+
581
+ - Jobs are now sorted by age in the Busy Workers table. [#4641]
582
+ - Fix "check all" JS logic in Web UI [#4619]
583
+
584
+ 6.1.0
585
+ ---------
586
+
587
+ - Web UI - Dark Mode fixes [#4543, natematykiewicz]
588
+ - Ensure `Rack::ContentLength` is loaded as middleware for correct Web UI responses [#4541]
589
+ - Avoid exception dumping SSL store in Redis connection logging [#4532]
590
+ - Better error messages in Sidekiq::Client [#4549]
591
+ - Remove rack-protection, reimplement CSRF protection [#4588]
592
+ - Require redis-rb 4.2 [#4591]
593
+ - Update to jquery 1.12.4 [#4593]
594
+ - Refactor internal fetch logic and API [#4602]
595
+
596
+ 6.0.7
597
+ ---------
598
+
599
+ - Refactor systemd integration to work better with custom binaries [#4511]
600
+ - Don't connect to Redis at process exit if not needed [#4502]
601
+ - Remove Redis connection naming [#4479]
602
+ - Fix Redis Sentinel password redaction [#4499]
603
+ - Add Vietnamese locale (vi) [#4528]
604
+
605
+ 6.0.6
606
+ ---------
607
+
608
+ - **Integrate with systemd's watchdog and notification features** [#4488]
609
+ Set `Type=notify` in [sidekiq.service](https://github.com/sidekiq/sidekiq/blob/4b8a8bd3ae42f6e48ae1fdaf95ed7d7af18ed8bb/examples/systemd/sidekiq.service#L30-L39). The integration works automatically.
610
+ - Use `setTimeout` rather than `setInterval` to avoid thundering herd [#4480]
611
+ - Fix edge case where a job can be pushed without a queue.
612
+ - Flush job stats at exit [#4498]
613
+ - Check RAILS_ENV before RACK_ENV [#4493]
614
+ - Add Lithuanian locale [#4476]
615
+
616
+ 6.0.5
617
+ ---------
618
+
619
+ - Fix broken Web UI response when using NewRelic and Rack 2.1.2+. [#4440]
620
+ - Update APIs to use `UNLINK`, not `DEL`. [#4449]
621
+ - Fix Ruby 2.7 warnings [#4412]
622
+ - Add support for `APP_ENV` [[95fa5d9]](https://github.com/sidekiq/sidekiq/commit/95fa5d90192148026e52ca2902f1b83c70858ce8)
623
+
624
+ 6.0.4
625
+ ---------
626
+
627
+ - Fix ActiveJob's `sidekiq_options` integration [#4404]
628
+ - Sidekiq Pro users will now see a Pause button next to each queue in
629
+ the Web UI, allowing them to pause queues manually [#4374, shayonj]
630
+ - Fix Sidekiq::Workers API unintentional change in 6.0.2 [#4387]
631
+
632
+
633
+ 6.0.3
634
+ ---------
635
+
636
+ - Fix `Sidekiq::Client.push_bulk` API which was erroneously putting
637
+ invalid `at` values in the job payloads [#4321]
638
+
639
+ 6.0.2
640
+ ---------
641
+
642
+ - Fix Sidekiq Enterprise's rolling restart functionality, broken by refactoring in 6.0.0. [#4334]
643
+ - More internal refactoring and performance tuning [fatkodima]
644
+
645
+ 6.0.1
646
+ ---------
647
+
648
+ - **Performance tuning**, Sidekiq should be 10-15% faster now [#4303, 4299,
649
+ 4269, fatkodima]
650
+ - **Dark Mode support in Web UI** (further design polish welcome!) [#4227, mperham,
651
+ fatkodima, silent-e]
652
+ - **Job-specific log levels**, allowing you to turn on debugging for
653
+ problematic workers. [fatkodima, #4287]
654
+ ```ruby
655
+ MyWorker.set(log_level: :debug).perform_async(...)
656
+ ```
657
+ - **Ad-hoc job tags**. You can tag your jobs with, e.g, subdomain, tenant, country,
658
+ locale, application, version, user/client, "alpha/beta/pro/ent", types of jobs,
659
+ teams/people responsible for jobs, additional metadata, etc.
660
+ Tags are shown on different pages with job listings. Sidekiq Pro users
661
+ can filter based on them [fatkodima, #4280]
662
+ ```ruby
663
+ class MyWorker
664
+ include Sidekiq::Worker
665
+ sidekiq_options tags: ['bank-ops', 'alpha']
666
+ ...
667
+ end
668
+ ```
669
+ - Fetch scheduled jobs in batches before pushing into specific queues.
670
+ This will decrease enqueueing time of scheduled jobs by a third. [fatkodima, #4273]
671
+ ```
672
+ ScheduledSet with 10,000 jobs
673
+ Before: 56.6 seconds
674
+ After: 39.2 seconds
675
+ ```
676
+ - Compress error backtraces before pushing into Redis, if you are
677
+ storing error backtraces, this will halve the size of your RetrySet
678
+ in Redis [fatkodima, #4272]
679
+ ```
680
+ RetrySet with 100,000 jobs
681
+ Before: 261 MB
682
+ After: 129 MB
683
+ ```
684
+ - Support display of ActiveJob 6.0 payloads in the Web UI [#4263]
685
+ - Add `SortedSet#scan` for pattern based scanning. For large sets this API will be **MUCH** faster
686
+ than standard iteration using each. [fatkodima, #4262]
687
+ ```ruby
688
+ Sidekiq::DeadSet.new.scan("UnreliableApi") do |job|
689
+ job.retry
690
+ end
691
+ ```
692
+ - Dramatically speed up SortedSet#find\_job(jid) by using Redis's ZSCAN
693
+ support, approx 10x faster. [fatkodima, #4259]
694
+ ```
695
+ zscan 0.179366 0.047727 0.227093 ( 1.161376)
696
+ enum 8.522311 0.419826 8.942137 ( 9.785079)
697
+ ```
698
+ - Respect rails' generators `test_framework` option and gracefully handle extra `worker` suffix on generator [fatkodima, #4256]
699
+ - Add ability to sort 'Enqueued' page on Web UI by position in the queue [fatkodima, #4248]
700
+ - Support `Client.push_bulk` with different delays [fatkodima, #4243]
701
+ ```ruby
702
+ Sidekiq::Client.push_bulk("class" => FooJob, "args" => [[1], [2]], "at" => [1.minute.from_now.to_f, 5.minutes.from_now.to_f])
703
+ ```
704
+ - Easier way to test enqueuing specific ActionMailer and ActiveRecord delayed jobs. Instead of manually
705
+ parsing embedded class, you can now test by fetching jobs for specific classes. [fatkodima, #4292]
706
+ ```ruby
707
+ assert_equal 1, Sidekiq::Extensions::DelayedMailer.jobs_for(FooMailer).size
708
+ ```
709
+ - Add `sidekiqmon` to gemspec executables [#4242]
710
+ - Gracefully handle `Sidekiq.logger = nil` [#4240]
711
+ - Inject Sidekiq::LogContext module if user-supplied logger does not include it [#4239]
712
+
713
+ 6.0
714
+ ---------
715
+
716
+ This release has major breaking changes. Read and test carefully in production.
717
+
718
+ - With Rails 6.0.2+, ActiveJobs can now use `sidekiq_options` directly to configure Sidekiq
719
+ features/internals like the retry subsystem. [#4213, pirj]
720
+ ```ruby
721
+ class MyJob < ActiveJob::Base
722
+ queue_as :myqueue
723
+ sidekiq_options retry: 10, backtrace: 20
724
+ def perform(...)
725
+ end
726
+ end
727
+ ```
728
+ - Logging has been redesigned to allow for pluggable log formatters:
729
+ ```ruby
730
+ Sidekiq.configure_server do |config|
731
+ config.log_formatter = Sidekiq::Logger::Formatters::JSON.new
732
+ end
733
+ ```
734
+ See the [Logging wiki page](https://github.com/sidekiq/sidekiq/wiki/Logging) for more details.
735
+ - **BREAKING CHANGE** Validate proper usage of the `REDIS_PROVIDER`
736
+ variable. This variable is meant to hold the name of the environment
737
+ variable which contains your Redis URL, so that you can switch Redis
738
+ providers quickly and easily with a single variable change. It is not
739
+ meant to hold the actual Redis URL itself. If you want to manually set
740
+ the Redis URL (not recommended as it implies you have no failover),
741
+ then you may set `REDIS_URL` directly. [#3969]
742
+ - **BREAKING CHANGE** Increase default shutdown timeout from 8 seconds
743
+ to 25 seconds. Both Heroku and ECS now use 30 second shutdown timeout
744
+ by default and we want Sidekiq to take advantage of this time. If you
745
+ have deployment scripts which depend on the old default timeout, use `-t 8` to
746
+ get the old behavior. [#3968]
747
+ - **BREAKING CHANGE** Remove the daemonization, logfile and pidfile
748
+ arguments to Sidekiq. Use a proper process supervisor (e.g. systemd or
749
+ foreman) to manage Sidekiq. See the Deployment wiki page for links to
750
+ more resources.
751
+ - Integrate the StandardRB code formatter to ensure consistent code
752
+ styling. [#4114, gearnode]
753
+
754
+ 5.2.10
755
+ ---------
756
+
757
+ - Backport fix for CVE-2022-23837.
758
+ - Migrate to `exists?` for redis-rb.
759
+ - Lock redis-rb to <4.6 to avoid deprecations.
760
+
761
+ 5.2.9
762
+ ---------
763
+
764
+ - Release Rack lock due to a cascade of CVEs. [#4566]
765
+ Pro-tip: don't lock Rack.
766
+
767
+ 5.2.8
768
+ ---------
769
+
770
+ - Lock to Rack 2.0.x to prevent future incompatibilities
771
+ - Fix invalid reference in `sidekiqctl`
772
+
773
+ 5.2.7
774
+ ---------
775
+
776
+ - Fix stale `enqueued_at` when retrying [#4149]
777
+ - Move build to [Circle CI](https://circleci.com/gh/mperham/sidekiq) [#4120]
778
+
779
+ 5.2.6
780
+ ---------
781
+
782
+ - Fix edge case where a job failure during Redis outage could result in a lost job [#4141]
783
+ - Better handling of malformed job arguments in payload [#4095]
784
+ - Restore bootstap's dropdown css component [#4099, urkle]
785
+ - Display human-friendly time diff for longer queue latencies [#4111, interlinked]
786
+ - Allow `Sidekiq::Worker#set` to be chained
787
+
788
+ 5.2.5
789
+ ---------
790
+
791
+ - Fix default usage of `config/sidekiq.yml` [#4077, Tensho]
792
+
793
+ 5.2.4
794
+ ---------
795
+
796
+ - Add warnings for various deprecations and changes coming in Sidekiq 6.0.
797
+ See the 6-0 branch. [#4056]
798
+ - Various improvements to the Sidekiq test suite and coverage [#4026, #4039, Tensho]
799
+
800
+ 5.2.3
801
+ ---------
802
+
803
+ - Warning message on invalid REDIS\_PROVIDER [#3970]
804
+ - Add `sidekiqctl status` command [#4003, dzunk]
805
+ - Update elapsed time calculatons to use monotonic clock [#3999]
806
+ - Fix a few issues with mobile Web UI styling [#3973, navied]
807
+ - Jobs with `retry: false` now go through the global `death_handlers`,
808
+ meaning you can take action on failed ephemeral jobs. [#3980, Benjamin-Dobell]
809
+ - Fix race condition in defining Workers. [#3997, mattbooks]
810
+
811
+ 5.2.2
812
+ ---------
813
+
814
+ - Raise error for duplicate queue names in config to avoid unexpected fetch algorithm change [#3911]
815
+ - Fix concurrency bug on JRuby [#3958, mattbooks]
816
+ - Add "Kill All" button to the retries page [#3938]
817
+
818
+ 5.2.1
819
+ -----------
820
+
821
+ - Fix concurrent modification error during heartbeat [#3921]
822
+
823
+ 5.2.0
824
+ -----------
825
+
826
+ - **Decrease default concurrency from 25 to 10** [#3892]
827
+ - Verify connection pool sizing upon startup [#3917]
828
+ - Smoother scheduling for large Sidekiq clusters [#3889]
829
+ - Switch Sidekiq::Testing impl from alias\_method to Module#prepend, for resiliency [#3852]
830
+ - Update Sidekiq APIs to use SCAN for scalability [#3848, ffiller]
831
+ - Remove concurrent-ruby gem dependency [#3830]
832
+ - Optimize Web UI's bootstrap.css [#3914]
833
+
834
+ 5.1.3
835
+ -----------
836
+
837
+ - Fix version comparison so Ruby 2.2.10 works. [#3808, nateberkopec]
838
+
839
+ 5.1.2
840
+ -----------
841
+
842
+ - Add link to docs in Web UI footer
843
+ - Fix crash on Ctrl-C in Windows [#3775, Bernica]
844
+ - Remove `freeze` calls on String constants. This is superfluous with Ruby
845
+ 2.3+ and `frozen_string_literal: true`. [#3759]
846
+ - Fix use of AR middleware outside of Rails [#3787]
847
+ - Sidekiq::Worker `sidekiq_retry_in` block can now return nil or 0 to use
848
+ the default backoff delay [#3796, dsalahutdinov]
849
+
850
+ 5.1.1
851
+ -----------
852
+
853
+ - Fix Web UI incompatibility with Redis 3.x gem [#3749]
854
+
855
+ 5.1.0
856
+ -----------
857
+
858
+ - **NEW** Global death handlers - called when your job exhausts all
859
+ retries and dies. Now you can take action when a job fails permanently. [#3721]
860
+ - **NEW** Enable ActiveRecord query cache within jobs by default [#3718, sobrinho]
861
+ This will prevent duplicate SELECTS; cache is cleared upon any UPDATE/INSERT/DELETE.
862
+ See the issue for how to bypass the cache or disable it completely.
863
+ - Scheduler timing is now more accurate, 15 -> 5 seconds [#3734]
864
+ - Exceptions during the :startup event will now kill the process [#3717]
865
+ - Make `Sidekiq::Client.via` reentrant [#3715]
866
+ - Fix use of Sidekiq logger outside of the server process [#3714]
867
+ - Tweak `constantize` to better match Rails class lookup. [#3701, caffeinated-tech]
868
+
869
+ 5.0.5
870
+ -----------
871
+
872
+ - Update gemspec to allow newer versions of the Redis gem [#3617]
873
+ - Refactor Worker.set so it can be memoized [#3602]
874
+ - Fix display of Redis URL in web footer, broken in 5.0.3 [#3560]
875
+ - Update `Sidekiq::Job#display_args` to avoid mutation [#3621]
876
+
877
+ 5.0.4
878
+ -----------
879
+
880
+ - Fix "slow startup" performance regression from 5.0.2. [#3525]
881
+ - Allow users to disable ID generation since some redis providers disable the CLIENT command. [#3521]
882
+
883
+ 5.0.3
884
+ -----------
885
+
886
+ - Fix overriding `class_attribute` core extension from ActiveSupport with Sidekiq one [PikachuEXE, #3499]
887
+ - Allow job logger to be overridden [AlfonsoUceda, #3502]
888
+ - Set a default Redis client identifier for debugging [#3516]
889
+ - Fix "Uninitialized constant" errors on startup with the delayed extensions [#3509]
890
+
891
+ 5.0.2
892
+ -----------
893
+
894
+ - fix broken release, thanks @nateberkopec
895
+
896
+ 5.0.1
897
+ -----------
898
+
899
+ - Fix incorrect server identity when daemonizing [jwilm, #3496]
900
+ - Work around error running Web UI against Redis Cluster [#3492]
901
+ - Remove core extensions, Sidekiq is now monkeypatch-free! [#3474]
902
+ - Reimplement Web UI's HTTP\_ACCEPT\_LANGUAGE parsing because the spec is utterly
903
+ incomprehensible for various edge cases. [johanlunds, natematykiewicz, #3449]
904
+ - Update `class_attribute` core extension to avoid warnings
905
+ - Expose `job_hash_context` from `Sidekiq::Logging` to support log customization
906
+
907
+ 5.0.0
908
+ -----------
909
+
910
+ - **BREAKING CHANGE** Job dispatch was refactored for safer integration with
911
+ Rails 5. The **Logging** and **RetryJobs** server middleware were removed and
912
+ functionality integrated directly into Sidekiq::Processor. These aren't
913
+ commonly used public APIs so this shouldn't impact most users.
914
+ ```
915
+ Sidekiq::Middleware::Server::RetryJobs -> Sidekiq::JobRetry
916
+ Sidekiq::Middleware::Server::Logging -> Sidekiq::JobLogger
917
+ ```
918
+ - Quieting Sidekiq is now done via the TSTP signal, the USR1 signal is deprecated.
919
+ - The `delay` extension APIs are no longer available by default, you
920
+ must opt into them.
921
+ - The Web UI is now BiDi and can render RTL languages like Arabic, Farsi and Hebrew.
922
+ - Rails 3.2 and Ruby 2.0 and 2.1 are no longer supported.
923
+ - The `SomeWorker.set(options)` API was re-written to avoid thread-local state. [#2152]
924
+ - Sidekiq Enterprise's encrypted jobs now display "[encrypted data]" in the Web UI instead
925
+ of random hex bytes.
926
+ - Please see the [5.0 Upgrade notes](docs/5.0-Upgrade.md) for more detail.
927
+
928
+ 4.2.10
4
929
  -----------
5
930
 
6
931
  - Scheduled jobs can now be moved directly to the Dead queue via API [#3390]
@@ -216,7 +1141,7 @@ Sidekiq::Queues.clear_all
216
1141
  - Sidekiq's internals have been completely overhauled for performance
217
1142
  and to remove dependencies. This has resulted in major speedups, as
218
1143
  [detailed on my blog](http://www.mikeperham.com/2015/10/14/optimizing-sidekiq/).
219
- - See the [4.0 upgrade notes](4.0-Upgrade.md) for more detail.
1144
+ - See the [4.0 upgrade notes](docs/4.0-Upgrade.md) for more detail.
220
1145
 
221
1146
  3.5.4
222
1147
  -----------
@@ -253,7 +1178,7 @@ Sidekiq::Queues.clear_all
253
1178
  - **FIX MEMORY LEAK** Under rare conditions, threads may leak [#2598, gazay]
254
1179
  - Add Ukrainian locale [#2561, elrakita]
255
1180
  - Disconnect and retry Redis operations if we see a READONLY error [#2550]
256
- - Add server middleware testing harness; see [wiki](https://github.com/mperham/sidekiq/wiki/Testing#testing-server-middleware) [#2534, ryansch]
1181
+ - Add server middleware testing harness; see [wiki](https://github.com/sidekiq/sidekiq/wiki/Testing#testing-server-middleware) [#2534, ryansch]
257
1182
 
258
1183
  3.5.0
259
1184
  -----------
@@ -271,7 +1196,7 @@ Sidekiq::Queues.clear_all
271
1196
  - Fix CSRF vulnerability in Web UI, thanks to Egor Homakov for
272
1197
  reporting. [#2422] If you are running the Web UI as a standalone Rack app,
273
1198
  ensure you have a [session middleware
274
- configured](https://github.com/mperham/sidekiq/wiki/Monitoring#standalone):
1199
+ configured](https://github.com/sidekiq/sidekiq/wiki/Monitoring#standalone):
275
1200
  ```ruby
276
1201
  use Rack::Session::Cookie, :secret => "some unique secret string here"
277
1202
  ```
@@ -483,7 +1408,7 @@ sidekiq_options :dead => false, :retry => 5
483
1408
  3.0.0
484
1409
  -----------
485
1410
 
486
- Please see [3.0-Upgrade.md](3.0-Upgrade.md) for more comprehensive upgrade notes.
1411
+ Please see [3.0-Upgrade.md](docs/3.0-Upgrade.md) for more comprehensive upgrade notes.
487
1412
 
488
1413
  - **Dead Job Queue** - jobs which run out of retries are now moved to a dead
489
1414
  job queue. These jobs must be retried manually or they will expire
@@ -527,7 +1452,7 @@ Sidekiq::Client.via(ConnectionPool.new { Redis.new }) do
527
1452
  end
528
1453
  ```
529
1454
  **Sharding support does require a breaking change to client-side
530
- middleware, see 3.0-Upgrade.md.**
1455
+ middleware, see docs/3.0-Upgrade.md.**
531
1456
  - New Chinese, Greek, Swedish and Czech translations for the Web UI.
532
1457
  - Updated most languages translations for the new UI features.
533
1458
  - **Remove official Capistrano integration** - this integration has been
@@ -655,7 +1580,7 @@ middleware, see 3.0-Upgrade.md.**
655
1580
  appear to be doing any work. [#1194]
656
1581
  - Sidekiq's testing behavior is now dynamic. You can choose between
657
1582
  `inline` and `fake` behavior in your tests. See
658
- [Testing](https://github.com/mperham/sidekiq/wiki/Testing) for detail. [#1193]
1583
+ [Testing](https://github.com/sidekiq/sidekiq/wiki/Testing) for detail. [#1193]
659
1584
  - The Retries table has a new column for the error message.
660
1585
  - The Web UI topbar now contains the status and live poll button.
661
1586
  - Orphaned worker records are now auto-vacuumed when you visit the