sidekiq 4.2.10 → 6.5.7

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 (131) hide show
  1. checksums.yaml +5 -5
  2. data/Changes.md +573 -1
  3. data/LICENSE +3 -3
  4. data/README.md +25 -34
  5. data/bin/sidekiq +27 -3
  6. data/bin/sidekiqload +81 -74
  7. data/bin/sidekiqmon +8 -0
  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/job_spec.rb.erb +6 -0
  11. data/lib/generators/sidekiq/templates/{worker_test.rb.erb → job_test.rb.erb} +1 -1
  12. data/lib/sidekiq/api.rb +585 -285
  13. data/lib/sidekiq/cli.rb +256 -233
  14. data/lib/sidekiq/client.rb +86 -83
  15. data/lib/sidekiq/component.rb +65 -0
  16. data/lib/sidekiq/delay.rb +43 -0
  17. data/lib/sidekiq/extensions/action_mailer.rb +13 -22
  18. data/lib/sidekiq/extensions/active_record.rb +13 -10
  19. data/lib/sidekiq/extensions/class_methods.rb +14 -11
  20. data/lib/sidekiq/extensions/generic_proxy.rb +13 -5
  21. data/lib/sidekiq/fetch.rb +50 -40
  22. data/lib/sidekiq/job.rb +13 -0
  23. data/lib/sidekiq/job_logger.rb +51 -0
  24. data/lib/sidekiq/job_retry.rb +282 -0
  25. data/lib/sidekiq/job_util.rb +71 -0
  26. data/lib/sidekiq/launcher.rb +184 -90
  27. data/lib/sidekiq/logger.rb +156 -0
  28. data/lib/sidekiq/manager.rb +43 -45
  29. data/lib/sidekiq/metrics/deploy.rb +47 -0
  30. data/lib/sidekiq/metrics/query.rb +153 -0
  31. data/lib/sidekiq/metrics/shared.rb +94 -0
  32. data/lib/sidekiq/metrics/tracking.rb +134 -0
  33. data/lib/sidekiq/middleware/chain.rb +102 -46
  34. data/lib/sidekiq/middleware/current_attributes.rb +63 -0
  35. data/lib/sidekiq/middleware/i18n.rb +7 -7
  36. data/lib/sidekiq/middleware/modules.rb +21 -0
  37. data/lib/sidekiq/monitor.rb +133 -0
  38. data/lib/sidekiq/paginator.rb +20 -16
  39. data/lib/sidekiq/processor.rb +176 -91
  40. data/lib/sidekiq/rails.rb +41 -96
  41. data/lib/sidekiq/redis_client_adapter.rb +154 -0
  42. data/lib/sidekiq/redis_connection.rb +117 -48
  43. data/lib/sidekiq/ring_buffer.rb +29 -0
  44. data/lib/sidekiq/scheduled.rb +134 -44
  45. data/lib/sidekiq/sd_notify.rb +149 -0
  46. data/lib/sidekiq/systemd.rb +24 -0
  47. data/lib/sidekiq/testing/inline.rb +6 -5
  48. data/lib/sidekiq/testing.rb +80 -61
  49. data/lib/sidekiq/transaction_aware_client.rb +45 -0
  50. data/lib/sidekiq/version.rb +2 -1
  51. data/lib/sidekiq/web/action.rb +15 -15
  52. data/lib/sidekiq/web/application.rb +129 -86
  53. data/lib/sidekiq/web/csrf_protection.rb +180 -0
  54. data/lib/sidekiq/web/helpers.rb +170 -83
  55. data/lib/sidekiq/web/router.rb +23 -19
  56. data/lib/sidekiq/web.rb +69 -109
  57. data/lib/sidekiq/worker.rb +290 -41
  58. data/lib/sidekiq.rb +185 -77
  59. data/sidekiq.gemspec +23 -27
  60. data/web/assets/images/apple-touch-icon.png +0 -0
  61. data/web/assets/javascripts/application.js +112 -61
  62. data/web/assets/javascripts/chart.min.js +13 -0
  63. data/web/assets/javascripts/chartjs-plugin-annotation.min.js +7 -0
  64. data/web/assets/javascripts/dashboard.js +70 -91
  65. data/web/assets/javascripts/graph.js +16 -0
  66. data/web/assets/javascripts/metrics.js +262 -0
  67. data/web/assets/stylesheets/application-dark.css +143 -0
  68. data/web/assets/stylesheets/application-rtl.css +242 -0
  69. data/web/assets/stylesheets/application.css +364 -144
  70. data/web/assets/stylesheets/bootstrap-rtl.min.css +9 -0
  71. data/web/assets/stylesheets/bootstrap.css +2 -2
  72. data/web/locales/ar.yml +87 -0
  73. data/web/locales/de.yml +14 -2
  74. data/web/locales/el.yml +43 -19
  75. data/web/locales/en.yml +15 -1
  76. data/web/locales/es.yml +22 -5
  77. data/web/locales/fa.yml +1 -0
  78. data/web/locales/fr.yml +10 -3
  79. data/web/locales/he.yml +79 -0
  80. data/web/locales/ja.yml +19 -4
  81. data/web/locales/lt.yml +83 -0
  82. data/web/locales/pl.yml +4 -4
  83. data/web/locales/pt-br.yml +27 -9
  84. data/web/locales/ru.yml +4 -0
  85. data/web/locales/ur.yml +80 -0
  86. data/web/locales/vi.yml +83 -0
  87. data/web/locales/zh-cn.yml +36 -11
  88. data/web/locales/zh-tw.yml +32 -7
  89. data/web/views/_footer.erb +5 -2
  90. data/web/views/_job_info.erb +3 -2
  91. data/web/views/_nav.erb +5 -19
  92. data/web/views/_paging.erb +1 -1
  93. data/web/views/_poll_link.erb +2 -5
  94. data/web/views/_summary.erb +7 -7
  95. data/web/views/busy.erb +62 -24
  96. data/web/views/dashboard.erb +24 -15
  97. data/web/views/dead.erb +3 -3
  98. data/web/views/layout.erb +14 -3
  99. data/web/views/metrics.erb +69 -0
  100. data/web/views/metrics_for_job.erb +87 -0
  101. data/web/views/morgue.erb +9 -6
  102. data/web/views/queue.erb +26 -12
  103. data/web/views/queues.erb +12 -2
  104. data/web/views/retries.erb +14 -7
  105. data/web/views/retry.erb +3 -3
  106. data/web/views/scheduled.erb +7 -4
  107. metadata +66 -206
  108. data/.github/contributing.md +0 -32
  109. data/.github/issue_template.md +0 -9
  110. data/.gitignore +0 -12
  111. data/.travis.yml +0 -18
  112. data/3.0-Upgrade.md +0 -70
  113. data/4.0-Upgrade.md +0 -53
  114. data/COMM-LICENSE +0 -95
  115. data/Ent-Changes.md +0 -173
  116. data/Gemfile +0 -29
  117. data/Pro-2.0-Upgrade.md +0 -138
  118. data/Pro-3.0-Upgrade.md +0 -44
  119. data/Pro-Changes.md +0 -628
  120. data/Rakefile +0 -12
  121. data/bin/sidekiqctl +0 -99
  122. data/code_of_conduct.md +0 -50
  123. data/lib/generators/sidekiq/templates/worker_spec.rb.erb +0 -6
  124. data/lib/generators/sidekiq/worker_generator.rb +0 -49
  125. data/lib/sidekiq/core_ext.rb +0 -119
  126. data/lib/sidekiq/exception_handler.rb +0 -31
  127. data/lib/sidekiq/logging.rb +0 -106
  128. data/lib/sidekiq/middleware/server/active_record.rb +0 -13
  129. data/lib/sidekiq/middleware/server/logging.rb +0 -31
  130. data/lib/sidekiq/middleware/server/retry_jobs.rb +0 -205
  131. data/lib/sidekiq/util.rb +0 -63
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 595500a3810c25e8e04e86c644f966ff01cb035f
4
- data.tar.gz: 3f92a9f61e61848bc2c0639469ce3588f3848fc0
2
+ SHA256:
3
+ metadata.gz: a46b127af053d0d8e34960975ba328973778e74e5e11c972b7ed90ad3ff37e81
4
+ data.tar.gz: b879598b3c9219e52b2c61ecc33fc03670a779a9afc3c5651f99240021391551
5
5
  SHA512:
6
- metadata.gz: c4e97c3665d1e902f47cfb579fda437dc834ac4b584606f1ca3b8fd9225e8502cacf5fb687673b4735b359de6af179589759a34369f1c74e904b37f8fe70a4ee
7
- data.tar.gz: a4e6d41067bf6b88c77577def0c1f9ecc3f5d46f0bdfb0821952c26867e91a71c64231aab09a25096d22c3272dea2dcc37547bc6096dd7622a192fa00e0a4e50
6
+ metadata.gz: b30b0d0ddf63bf32cf9dadce9090112fcc0a26f3aa255fa49b784197a22ccc49280c323a7cbcccbd64fc7fb78b0273824c763bf7fc06dfcc0f310562099597de
7
+ data.tar.gz: e987d3347e7bd83a7abda98c72b1f9c79f7a75686e1895a4ad6e937c8eb3350a90fc03f010ea7c781b5a3609e5e255c2773cffda3e4c4570470ef8f1ed108316
data/Changes.md CHANGED
@@ -1,6 +1,578 @@
1
1
  # Sidekiq Changes
2
2
 
3
- HEAD
3
+ [Sidekiq Changes](https://github.com/mperham/sidekiq/blob/main/Changes.md) | [Sidekiq Pro Changes](https://github.com/mperham/sidekiq/blob/main/Pro-Changes.md) | [Sidekiq Enterprise Changes](https://github.com/mperham/sidekiq/blob/main/Ent-Changes.md)
4
+
5
+ 6.5.7
6
+ ----------
7
+
8
+ - Updates for JA and ZH locales
9
+ - Further optimizations for scheduled polling [#5513]
10
+
11
+ 6.5.6
12
+ ----------
13
+
14
+ - Fix deprecation warnings with redis-rb 4.8.0 [#5484]
15
+ - Lock redis-rb to < 5.0 as we are moving to redis-client in Sidekiq 7.0
16
+
17
+ 6.5.5
18
+ ----------
19
+
20
+ - Fix require issue with job_retry.rb [#5462]
21
+ - Improve Sidekiq::Web compatibility with Rack 3.x
22
+
23
+ 6.5.4
24
+ ----------
25
+
26
+ - Fix invalid code on Ruby 2.5 [#5460]
27
+ - Fix further metrics dependency issues [#5457]
28
+
29
+ 6.5.3
30
+ ----------
31
+
32
+ - Don't require metrics code without explicit opt-in [#5456]
33
+
34
+ 6.5.2
35
+ ----------
36
+
37
+ - [Job Metrics are under active development, help wanted!](https://github.com/mperham/sidekiq/wiki/Metrics#contributing) **BETA**
38
+ - Add `Context` column on queue page which shows any CurrentAttributes [#5450]
39
+ - `sidekiq_retry_in` may now return `:discard` or `:kill` to dynamically stop job retries [#5406]
40
+ - Smarter sorting of processes in /busy Web UI [#5398]
41
+ - Fix broken hamburger menu in mobile UI [#5428]
42
+ - Require redis-rb 4.5.0. Note that Sidekiq will break if you use the
43
+ [`Redis.exists_returns_integer = false`](https://github.com/redis/redis-rb/blob/master/CHANGELOG.md#450) flag. [#5394]
44
+
45
+ 6.5.1
46
+ ----------
47
+
48
+ - Fix `push_bulk` breakage [#5387]
49
+
50
+ 6.5.0
51
+ ---------
52
+
53
+ - Substantial refactoring of Sidekiq server internals, part of a larger effort
54
+ 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).
55
+ - **Add beta support for the `redis-client` gem**. This will become the default Redis driver in Sidekiq 7.0. [#5298]
56
+ Read more: https://github.com/mperham/sidekiq/wiki/Using-redis-client
57
+ - **Add beta support for DB transaction-aware client** [#5291]
58
+ Add this line to your initializer and any jobs created during a transaction
59
+ will only be pushed to Redis **after the transaction commits**. You will need to add the
60
+ `after_commit_everywhere` gem to your Gemfile.
61
+ ```ruby
62
+ Sidekiq.transactional_push!
63
+ ```
64
+ This feature does not have a lot of production usage yet; please try it out and let us
65
+ know if you have any issues. It will be fully supported in Sidekiq 7.0 or removed if it
66
+ proves problematic.
67
+ - Fix regression with middleware arguments [#5312]
68
+
69
+ 6.4.2
70
+ ---------
71
+
72
+ - Strict argument checking now runs after client-side middleware [#5246]
73
+ - Fix page events with live polling [#5184]
74
+ - Many under-the-hood changes to remove all usage of the term "worker"
75
+ from the Sidekiq codebase and APIs. This mostly involved RDoc and local
76
+ variable names but a few constants and public APIs were changed. The old
77
+ APIs will be removed in Sidekiq 7.0.
78
+ ```
79
+ Sidekiq::DEFAULT_WORKER_OPTIONS -> Sidekiq.default_job_options
80
+ Sidekiq.default_worker_options -> Sidekiq.default_job_options
81
+ Sidekiq::Queues["default"].jobs_by_worker(HardJob) -> Sidekiq::Queues["default"].jobs_by_class(HardJob)
82
+ ```
83
+
84
+ 6.4.1
85
+ ---------
86
+
87
+ - Fix pipeline/multi deprecations in redis-rb 4.6
88
+ - Fix sidekiq.yml YAML load errors on Ruby 3.1 [#5141]
89
+ - Sharding support for `perform_bulk` [#5129]
90
+ - Refactor job logger for SPEEEEEEED
91
+
92
+ 6.4.0
93
+ ---------
94
+
95
+ - **SECURITY**: Validate input to avoid possible DoS in Web UI.
96
+ - Add **strict argument checking** [#5071]
97
+ Sidekiq will now log a warning if JSON-unsafe arguments are passed to `perform_async`.
98
+ Add `Sidekiq.strict_args!(false)` to your initializer to disable this warning.
99
+ This warning will switch to an exception in Sidekiq 7.0.
100
+ - Note that Delayed Extensions will be removed in Sidekiq 7.0 [#5076]
101
+ - Add `perform_{inline,sync}` in Sidekiq::Job to run a job synchronously [#5061, hasan-ally]
102
+ ```ruby
103
+ SomeJob.perform_async(args...)
104
+ SomeJob.perform_sync(args...)
105
+ SomeJob.perform_inline(args...)
106
+ ```
107
+ You can also dynamically redirect a job to run synchronously:
108
+ ```ruby
109
+ SomeJob.set("sync": true).perform_async(args...) # will run via perform_inline
110
+ ```
111
+ - Replace Sidekiq::Worker `app/workers` generator with Sidekiq::Job `app/sidekiq` generator [#5055]
112
+ ```
113
+ bin/rails generate sidekiq:job ProcessOrderJob
114
+ ```
115
+ - Fix job retries losing CurrentAttributes [#5090]
116
+ - Tweak shutdown to give long-running threads time to cleanup [#5095]
117
+
118
+ 6.3.1
119
+ ---------
120
+
121
+ - Fix keyword arguments error with CurrentAttributes on Ruby 3.0 [#5048]
122
+
123
+ 6.3.0
124
+ ---------
125
+
126
+ - **BREAK**: The Web UI has been refactored to remove jQuery. Any UI extensions
127
+ which use jQuery will break.
128
+ - **FEATURE**: Sidekiq.logger has been enhanced so any `Rails.logger`
129
+ output in jobs now shows up in the Sidekiq console. Remove any logger
130
+ hacks in your initializer and see if it Just Works™ now. [#5021]
131
+ - **FEATURE**: Add `Sidekiq::Job` alias for `Sidekiq::Worker`, to better
132
+ reflect industry standard terminology. You can now do this:
133
+ ```ruby
134
+ class MyJob
135
+ include Sidekiq::Job
136
+ sidekiq_options ...
137
+ def perform(args)
138
+ end
139
+ end
140
+ ```
141
+ - **FEATURE**: Support for serializing ActiveSupport::CurrentAttributes into each job. [#4982]
142
+ ```ruby
143
+ # config/initializers/sidekiq.rb
144
+ require "sidekiq/middleware/current_attributes"
145
+ Sidekiq::CurrentAttributes.persist(Myapp::Current) # Your AS::CurrentAttributes singleton
146
+ ```
147
+ - **FEATURE**: Add `Sidekiq::Worker.perform_bulk` for enqueuing jobs in bulk,
148
+ similar to `Sidekiq::Client.push_bulk` [#5042]
149
+ ```ruby
150
+ MyJob.perform_bulk([[1], [2], [3]])
151
+ ```
152
+ - Implement `queue_as`, `wait` and `wait_until` for ActiveJob compatibility [#5003]
153
+ - Scheduler now uses Lua to reduce Redis load and network roundtrips [#5044]
154
+ - Retry Redis operation if we get an `UNBLOCKED` Redis error [#4985]
155
+ - Run existing signal traps, if any, before running Sidekiq's trap [#4991]
156
+ - Fix fetch bug when using weighted queues which caused Sidekiq to stop
157
+ processing queues randomly [#5031]
158
+
159
+ 6.2.2
160
+ ---------
161
+
162
+ - Reduce retry jitter, add jitter to `sidekiq_retry_in` values [#4957]
163
+ - Minimize scheduler load on Redis at scale [#4882]
164
+ - Improve logging of delay jobs [#4904, BuonOno]
165
+ - Minor CSS improvements for buttons and tables, design PRs always welcome!
166
+ - Tweak Web UI `Cache-Control` header [#4966]
167
+ - Rename internal API class `Sidekiq::Job` to `Sidekiq::JobRecord` [#4955]
168
+
169
+ 6.2.1
170
+ ---------
171
+
172
+ - Update RTT warning logic to handle transient RTT spikes [#4851]
173
+ - Fix very low priority CVE on unescaped queue name [#4852]
174
+ - Add note about sessions and Rails apps in API mode
175
+
176
+ 6.2.0
177
+ ---------
178
+
179
+ - Store Redis RTT and log if poor [#4824]
180
+ - Add process/thread stats to Busy page [#4806]
181
+ - Improve Web UI on mobile devices [#4840]
182
+ - **Refactor Web UI session usage** [#4804]
183
+ Numerous people have hit "Forbidden" errors and struggled with Sidekiq's
184
+ Web UI session requirement. If you have code in your initializer for
185
+ Web sessions, it's quite possible it will need to be removed. Here's
186
+ an overview:
187
+ ```
188
+ Sidekiq::Web needs a valid Rack session for CSRF protection. If this is a Rails app,
189
+ make sure you mount Sidekiq::Web *inside* your routes in `config/routes.rb` so
190
+ Sidekiq can reuse the Rails session:
191
+
192
+ Rails.application.routes.draw do
193
+ mount Sidekiq::Web => "/sidekiq"
194
+ ....
195
+ end
196
+
197
+ If this is a bare Rack app, use a session middleware before Sidekiq::Web:
198
+
199
+ # first, use IRB to create a shared secret key for sessions and commit it
200
+ require 'securerandom'; File.open(".session.key", "w") {|f| f.write(SecureRandom.hex(32)) }
201
+
202
+ # now, update your Rack app to include the secret with a session cookie middleware
203
+ use Rack::Session::Cookie, secret: File.read(".session.key"), same_site: true, max_age: 86400
204
+ run Sidekiq::Web
205
+
206
+ If this is a Rails app in API mode, you need to enable sessions.
207
+
208
+ https://guides.rubyonrails.org/api_app.html#using-session-middlewares
209
+ ```
210
+
211
+ 6.1.3
212
+ ---------
213
+
214
+ - Warn if Redis is configured to evict data under memory pressure [#4752]
215
+ - Add process RSS on the Busy page [#4717]
216
+
217
+ 6.1.2
218
+ ---------
219
+
220
+ - Improve readability in dark mode Web UI [#4674]
221
+ - Fix Web UI crash with corrupt session [#4672]
222
+ - Allow middleware to yield arguments [#4673, @eugeneius]
223
+ - Migrate CI from CircleCI to GitHub Actions [#4677]
224
+
225
+ 6.1.1
226
+ ---------
227
+
228
+ - Jobs are now sorted by age in the Busy Workers table. [#4641]
229
+ - Fix "check all" JS logic in Web UI [#4619]
230
+
231
+ 6.1.0
232
+ ---------
233
+
234
+ - Web UI - Dark Mode fixes [#4543, natematykiewicz]
235
+ - Ensure `Rack::ContentLength` is loaded as middleware for correct Web UI responses [#4541]
236
+ - Avoid exception dumping SSL store in Redis connection logging [#4532]
237
+ - Better error messages in Sidekiq::Client [#4549]
238
+ - Remove rack-protection, reimplement CSRF protection [#4588]
239
+ - Require redis-rb 4.2 [#4591]
240
+ - Update to jquery 1.12.4 [#4593]
241
+ - Refactor internal fetch logic and API [#4602]
242
+
243
+ 6.0.7
244
+ ---------
245
+
246
+ - Refactor systemd integration to work better with custom binaries [#4511]
247
+ - Don't connect to Redis at process exit if not needed [#4502]
248
+ - Remove Redis connection naming [#4479]
249
+ - Fix Redis Sentinel password redaction [#4499]
250
+ - Add Vietnamese locale (vi) [#4528]
251
+
252
+ 6.0.6
253
+ ---------
254
+
255
+ - **Integrate with systemd's watchdog and notification features** [#4488]
256
+ Set `Type=notify` in [sidekiq.service](https://github.com/mperham/sidekiq/blob/4b8a8bd3ae42f6e48ae1fdaf95ed7d7af18ed8bb/examples/systemd/sidekiq.service#L30-L39). The integration works automatically.
257
+ - Use `setTimeout` rather than `setInterval` to avoid thundering herd [#4480]
258
+ - Fix edge case where a job can be pushed without a queue.
259
+ - Flush job stats at exit [#4498]
260
+ - Check RAILS_ENV before RACK_ENV [#4493]
261
+ - Add Lithuanian locale [#4476]
262
+
263
+ 6.0.5
264
+ ---------
265
+
266
+ - Fix broken Web UI response when using NewRelic and Rack 2.1.2+. [#4440]
267
+ - Update APIs to use `UNLINK`, not `DEL`. [#4449]
268
+ - Fix Ruby 2.7 warnings [#4412]
269
+ - Add support for `APP_ENV` [[95fa5d9]](https://github.com/mperham/sidekiq/commit/95fa5d90192148026e52ca2902f1b83c70858ce8)
270
+
271
+ 6.0.4
272
+ ---------
273
+
274
+ - Fix ActiveJob's `sidekiq_options` integration [#4404]
275
+ - Sidekiq Pro users will now see a Pause button next to each queue in
276
+ the Web UI, allowing them to pause queues manually [#4374, shayonj]
277
+ - Fix Sidekiq::Workers API unintentional change in 6.0.2 [#4387]
278
+
279
+
280
+ 6.0.3
281
+ ---------
282
+
283
+ - Fix `Sidekiq::Client.push_bulk` API which was erroneously putting
284
+ invalid `at` values in the job payloads [#4321]
285
+
286
+ 6.0.2
287
+ ---------
288
+
289
+ - Fix Sidekiq Enterprise's rolling restart functionality, broken by refactoring in 6.0.0. [#4334]
290
+ - More internal refactoring and performance tuning [fatkodima]
291
+
292
+ 6.0.1
293
+ ---------
294
+
295
+ - **Performance tuning**, Sidekiq should be 10-15% faster now [#4303, 4299,
296
+ 4269, fatkodima]
297
+ - **Dark Mode support in Web UI** (further design polish welcome!) [#4227, mperham,
298
+ fatkodima, silent-e]
299
+ - **Job-specific log levels**, allowing you to turn on debugging for
300
+ problematic workers. [fatkodima, #4287]
301
+ ```ruby
302
+ MyWorker.set(log_level: :debug).perform_async(...)
303
+ ```
304
+ - **Ad-hoc job tags**. You can tag your jobs with, e.g, subdomain, tenant, country,
305
+ locale, application, version, user/client, "alpha/beta/pro/ent", types of jobs,
306
+ teams/people responsible for jobs, additional metadata, etc.
307
+ Tags are shown on different pages with job listings. Sidekiq Pro users
308
+ can filter based on them [fatkodima, #4280]
309
+ ```ruby
310
+ class MyWorker
311
+ include Sidekiq::Worker
312
+ sidekiq_options tags: ['bank-ops', 'alpha']
313
+ ...
314
+ end
315
+ ```
316
+ - Fetch scheduled jobs in batches before pushing into specific queues.
317
+ This will decrease enqueueing time of scheduled jobs by a third. [fatkodima, #4273]
318
+ ```
319
+ ScheduledSet with 10,000 jobs
320
+ Before: 56.6 seconds
321
+ After: 39.2 seconds
322
+ ```
323
+ - Compress error backtraces before pushing into Redis, if you are
324
+ storing error backtraces, this will halve the size of your RetrySet
325
+ in Redis [fatkodima, #4272]
326
+ ```
327
+ RetrySet with 100,000 jobs
328
+ Before: 261 MB
329
+ After: 129 MB
330
+ ```
331
+ - Support display of ActiveJob 6.0 payloads in the Web UI [#4263]
332
+ - Add `SortedSet#scan` for pattern based scanning. For large sets this API will be **MUCH** faster
333
+ than standard iteration using each. [fatkodima, #4262]
334
+ ```ruby
335
+ Sidekiq::DeadSet.new.scan("UnreliableApi") do |job|
336
+ job.retry
337
+ end
338
+ ```
339
+ - Dramatically speed up SortedSet#find\_job(jid) by using Redis's ZSCAN
340
+ support, approx 10x faster. [fatkodima, #4259]
341
+ ```
342
+ zscan 0.179366 0.047727 0.227093 ( 1.161376)
343
+ enum 8.522311 0.419826 8.942137 ( 9.785079)
344
+ ```
345
+ - Respect rails' generators `test_framework` option and gracefully handle extra `worker` suffix on generator [fatkodima, #4256]
346
+ - Add ability to sort 'Enqueued' page on Web UI by position in the queue [fatkodima, #4248]
347
+ - Support `Client.push_bulk` with different delays [fatkodima, #4243]
348
+ ```ruby
349
+ Sidekiq::Client.push_bulk("class" => FooJob, "args" => [[1], [2]], "at" => [1.minute.from_now.to_f, 5.minutes.from_now.to_f])
350
+ ```
351
+ - Easier way to test enqueuing specific ActionMailer and ActiveRecord delayed jobs. Instead of manually
352
+ parsing embedded class, you can now test by fetching jobs for specific classes. [fatkodima, #4292]
353
+ ```ruby
354
+ assert_equal 1, Sidekiq::Extensions::DelayedMailer.jobs_for(FooMailer).size
355
+ ```
356
+ - Add `sidekiqmon` to gemspec executables [#4242]
357
+ - Gracefully handle `Sidekiq.logger = nil` [#4240]
358
+ - Inject Sidekiq::LogContext module if user-supplied logger does not include it [#4239]
359
+
360
+ 6.0
361
+ ---------
362
+
363
+ This release has major breaking changes. Read and test carefully in production.
364
+
365
+ - With Rails 6.0.2+, ActiveJobs can now use `sidekiq_options` directly to configure Sidekiq
366
+ features/internals like the retry subsystem. [#4213, pirj]
367
+ ```ruby
368
+ class MyJob < ActiveJob::Base
369
+ queue_as :myqueue
370
+ sidekiq_options retry: 10, backtrace: 20
371
+ def perform(...)
372
+ end
373
+ end
374
+ ```
375
+ - Logging has been redesigned to allow for pluggable log formatters:
376
+ ```ruby
377
+ Sidekiq.configure_server do |config|
378
+ config.log_formatter = Sidekiq::Logger::Formatters::JSON.new
379
+ end
380
+ ```
381
+ See the [Logging wiki page](https://github.com/mperham/sidekiq/wiki/Logging) for more details.
382
+ - **BREAKING CHANGE** Validate proper usage of the `REDIS_PROVIDER`
383
+ variable. This variable is meant to hold the name of the environment
384
+ variable which contains your Redis URL, so that you can switch Redis
385
+ providers quickly and easily with a single variable change. It is not
386
+ meant to hold the actual Redis URL itself. If you want to manually set
387
+ the Redis URL (not recommended as it implies you have no failover),
388
+ then you may set `REDIS_URL` directly. [#3969]
389
+ - **BREAKING CHANGE** Increase default shutdown timeout from 8 seconds
390
+ to 25 seconds. Both Heroku and ECS now use 30 second shutdown timeout
391
+ by default and we want Sidekiq to take advantage of this time. If you
392
+ have deployment scripts which depend on the old default timeout, use `-t 8` to
393
+ get the old behavior. [#3968]
394
+ - **BREAKING CHANGE** Remove the daemonization, logfile and pidfile
395
+ arguments to Sidekiq. Use a proper process supervisor (e.g. systemd or
396
+ foreman) to manage Sidekiq. See the Deployment wiki page for links to
397
+ more resources.
398
+ - Integrate the StandardRB code formatter to ensure consistent code
399
+ styling. [#4114, gearnode]
400
+
401
+ 5.2.10
402
+ ---------
403
+
404
+ - Backport fix for CVE-2022-23837.
405
+ - Migrate to `exists?` for redis-rb.
406
+ - Lock redis-rb to <4.6 to avoid deprecations.
407
+
408
+ 5.2.9
409
+ ---------
410
+
411
+ - Release Rack lock due to a cascade of CVEs. [#4566]
412
+ Pro-tip: don't lock Rack.
413
+
414
+ 5.2.8
415
+ ---------
416
+
417
+ - Lock to Rack 2.0.x to prevent future incompatibilities
418
+ - Fix invalid reference in `sidekiqctl`
419
+
420
+ 5.2.7
421
+ ---------
422
+
423
+ - Fix stale `enqueued_at` when retrying [#4149]
424
+ - Move build to [Circle CI](https://circleci.com/gh/mperham/sidekiq) [#4120]
425
+
426
+ 5.2.6
427
+ ---------
428
+
429
+ - Fix edge case where a job failure during Redis outage could result in a lost job [#4141]
430
+ - Better handling of malformed job arguments in payload [#4095]
431
+ - Restore bootstap's dropdown css component [#4099, urkle]
432
+ - Display human-friendly time diff for longer queue latencies [#4111, interlinked]
433
+ - Allow `Sidekiq::Worker#set` to be chained
434
+
435
+ 5.2.5
436
+ ---------
437
+
438
+ - Fix default usage of `config/sidekiq.yml` [#4077, Tensho]
439
+
440
+ 5.2.4
441
+ ---------
442
+
443
+ - Add warnings for various deprecations and changes coming in Sidekiq 6.0.
444
+ See the 6-0 branch. [#4056]
445
+ - Various improvements to the Sidekiq test suite and coverage [#4026, #4039, Tensho]
446
+
447
+ 5.2.3
448
+ ---------
449
+
450
+ - Warning message on invalid REDIS\_PROVIDER [#3970]
451
+ - Add `sidekiqctl status` command [#4003, dzunk]
452
+ - Update elapsed time calculatons to use monotonic clock [#3999]
453
+ - Fix a few issues with mobile Web UI styling [#3973, navied]
454
+ - Jobs with `retry: false` now go through the global `death_handlers`,
455
+ meaning you can take action on failed ephemeral jobs. [#3980, Benjamin-Dobell]
456
+ - Fix race condition in defining Workers. [#3997, mattbooks]
457
+
458
+ 5.2.2
459
+ ---------
460
+
461
+ - Raise error for duplicate queue names in config to avoid unexpected fetch algorithm change [#3911]
462
+ - Fix concurrency bug on JRuby [#3958, mattbooks]
463
+ - Add "Kill All" button to the retries page [#3938]
464
+
465
+ 5.2.1
466
+ -----------
467
+
468
+ - Fix concurrent modification error during heartbeat [#3921]
469
+
470
+ 5.2.0
471
+ -----------
472
+
473
+ - **Decrease default concurrency from 25 to 10** [#3892]
474
+ - Verify connection pool sizing upon startup [#3917]
475
+ - Smoother scheduling for large Sidekiq clusters [#3889]
476
+ - Switch Sidekiq::Testing impl from alias\_method to Module#prepend, for resiliency [#3852]
477
+ - Update Sidekiq APIs to use SCAN for scalability [#3848, ffiller]
478
+ - Remove concurrent-ruby gem dependency [#3830]
479
+ - Optimize Web UI's bootstrap.css [#3914]
480
+
481
+ 5.1.3
482
+ -----------
483
+
484
+ - Fix version comparison so Ruby 2.2.10 works. [#3808, nateberkopec]
485
+
486
+ 5.1.2
487
+ -----------
488
+
489
+ - Add link to docs in Web UI footer
490
+ - Fix crash on Ctrl-C in Windows [#3775, Bernica]
491
+ - Remove `freeze` calls on String constants. This is superfluous with Ruby
492
+ 2.3+ and `frozen_string_literal: true`. [#3759]
493
+ - Fix use of AR middleware outside of Rails [#3787]
494
+ - Sidekiq::Worker `sidekiq_retry_in` block can now return nil or 0 to use
495
+ the default backoff delay [#3796, dsalahutdinov]
496
+
497
+ 5.1.1
498
+ -----------
499
+
500
+ - Fix Web UI incompatibility with Redis 3.x gem [#3749]
501
+
502
+ 5.1.0
503
+ -----------
504
+
505
+ - **NEW** Global death handlers - called when your job exhausts all
506
+ retries and dies. Now you can take action when a job fails permanently. [#3721]
507
+ - **NEW** Enable ActiveRecord query cache within jobs by default [#3718, sobrinho]
508
+ This will prevent duplicate SELECTS; cache is cleared upon any UPDATE/INSERT/DELETE.
509
+ See the issue for how to bypass the cache or disable it completely.
510
+ - Scheduler timing is now more accurate, 15 -> 5 seconds [#3734]
511
+ - Exceptions during the :startup event will now kill the process [#3717]
512
+ - Make `Sidekiq::Client.via` reentrant [#3715]
513
+ - Fix use of Sidekiq logger outside of the server process [#3714]
514
+ - Tweak `constantize` to better match Rails class lookup. [#3701, caffeinated-tech]
515
+
516
+ 5.0.5
517
+ -----------
518
+
519
+ - Update gemspec to allow newer versions of the Redis gem [#3617]
520
+ - Refactor Worker.set so it can be memoized [#3602]
521
+ - Fix display of Redis URL in web footer, broken in 5.0.3 [#3560]
522
+ - Update `Sidekiq::Job#display_args` to avoid mutation [#3621]
523
+
524
+ 5.0.4
525
+ -----------
526
+
527
+ - Fix "slow startup" performance regression from 5.0.2. [#3525]
528
+ - Allow users to disable ID generation since some redis providers disable the CLIENT command. [#3521]
529
+
530
+ 5.0.3
531
+ -----------
532
+
533
+ - Fix overriding `class_attribute` core extension from ActiveSupport with Sidekiq one [PikachuEXE, #3499]
534
+ - Allow job logger to be overridden [AlfonsoUceda, #3502]
535
+ - Set a default Redis client identifier for debugging [#3516]
536
+ - Fix "Uninitialized constant" errors on startup with the delayed extensions [#3509]
537
+
538
+ 5.0.2
539
+ -----------
540
+
541
+ - fix broken release, thanks @nateberkopec
542
+
543
+ 5.0.1
544
+ -----------
545
+
546
+ - Fix incorrect server identity when daemonizing [jwilm, #3496]
547
+ - Work around error running Web UI against Redis Cluster [#3492]
548
+ - Remove core extensions, Sidekiq is now monkeypatch-free! [#3474]
549
+ - Reimplement Web UI's HTTP\_ACCEPT\_LANGUAGE parsing because the spec is utterly
550
+ incomprehensible for various edge cases. [johanlunds, natematykiewicz, #3449]
551
+ - Update `class_attribute` core extension to avoid warnings
552
+ - Expose `job_hash_context` from `Sidekiq::Logging` to support log customization
553
+
554
+ 5.0.0
555
+ -----------
556
+
557
+ - **BREAKING CHANGE** Job dispatch was refactored for safer integration with
558
+ Rails 5. The **Logging** and **RetryJobs** server middleware were removed and
559
+ functionality integrated directly into Sidekiq::Processor. These aren't
560
+ commonly used public APIs so this shouldn't impact most users.
561
+ ```
562
+ Sidekiq::Middleware::Server::RetryJobs -> Sidekiq::JobRetry
563
+ Sidekiq::Middleware::Server::Logging -> Sidekiq::JobLogger
564
+ ```
565
+ - Quieting Sidekiq is now done via the TSTP signal, the USR1 signal is deprecated.
566
+ - The `delay` extension APIs are no longer available by default, you
567
+ must opt into them.
568
+ - The Web UI is now BiDi and can render RTL languages like Arabic, Farsi and Hebrew.
569
+ - Rails 3.2 and Ruby 2.0 and 2.1 are no longer supported.
570
+ - The `SomeWorker.set(options)` API was re-written to avoid thread-local state. [#2152]
571
+ - Sidekiq Enterprise's encrypted jobs now display "[encrypted data]" in the Web UI instead
572
+ of random hex bytes.
573
+ - Please see the [5.0 Upgrade notes](5.0-Upgrade.md) for more detail.
574
+
575
+ 4.2.10
4
576
  -----------
5
577
 
6
578
  - Scheduled jobs can now be moved directly to the Dead queue via API [#3390]
data/LICENSE CHANGED
@@ -4,6 +4,6 @@ Sidekiq is an Open Source project licensed under the terms of
4
4
  the LGPLv3 license. Please see <http://www.gnu.org/licenses/lgpl-3.0.html>
5
5
  for license text.
6
6
 
7
- Sidekiq Pro has a commercial-friendly license allowing private forks
8
- and modifications of Sidekiq. Please see http://sidekiq.org/pro/ for
9
- more detail. You can find the commercial license terms in COMM-LICENSE.
7
+ Sidekiq Pro and Sidekiq Enterprise have a commercial-friendly license.
8
+ You can find the commercial license in COMM-LICENSE.txt.
9
+ Please see https://sidekiq.org for purchasing options.