sidekiq 5.2.10 → 7.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (149) hide show
  1. checksums.yaml +4 -4
  2. data/Changes.md +540 -8
  3. data/LICENSE.txt +9 -0
  4. data/README.md +47 -50
  5. data/bin/sidekiq +22 -3
  6. data/bin/sidekiqload +213 -115
  7. data/bin/sidekiqmon +11 -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/{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 +557 -354
  13. data/lib/sidekiq/capsule.rb +127 -0
  14. data/lib/sidekiq/cli.rb +204 -226
  15. data/lib/sidekiq/client.rb +124 -101
  16. data/lib/sidekiq/component.rb +68 -0
  17. data/lib/sidekiq/config.rb +278 -0
  18. data/lib/sidekiq/deploy.rb +62 -0
  19. data/lib/sidekiq/embedded.rb +61 -0
  20. data/lib/sidekiq/fetch.rb +49 -42
  21. data/lib/sidekiq/job.rb +374 -0
  22. data/lib/sidekiq/job_logger.rb +33 -7
  23. data/lib/sidekiq/job_retry.rb +145 -107
  24. data/lib/sidekiq/job_util.rb +107 -0
  25. data/lib/sidekiq/launcher.rb +203 -105
  26. data/lib/sidekiq/logger.rb +131 -0
  27. data/lib/sidekiq/manager.rb +43 -46
  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 +136 -0
  31. data/lib/sidekiq/middleware/chain.rb +113 -56
  32. data/lib/sidekiq/middleware/current_attributes.rb +95 -0
  33. data/lib/sidekiq/middleware/i18n.rb +7 -7
  34. data/lib/sidekiq/middleware/modules.rb +21 -0
  35. data/lib/sidekiq/monitor.rb +146 -0
  36. data/lib/sidekiq/paginator.rb +28 -16
  37. data/lib/sidekiq/processor.rb +122 -120
  38. data/lib/sidekiq/rails.rb +53 -38
  39. data/lib/sidekiq/redis_client_adapter.rb +96 -0
  40. data/lib/sidekiq/redis_connection.rb +38 -107
  41. data/lib/sidekiq/ring_buffer.rb +29 -0
  42. data/lib/sidekiq/scheduled.rb +111 -49
  43. data/lib/sidekiq/sd_notify.rb +149 -0
  44. data/lib/sidekiq/systemd.rb +24 -0
  45. data/lib/sidekiq/testing/inline.rb +6 -5
  46. data/lib/sidekiq/testing.rb +66 -84
  47. data/lib/sidekiq/transaction_aware_client.rb +44 -0
  48. data/lib/sidekiq/version.rb +3 -1
  49. data/lib/sidekiq/web/action.rb +15 -11
  50. data/lib/sidekiq/web/application.rb +119 -78
  51. data/lib/sidekiq/web/csrf_protection.rb +180 -0
  52. data/lib/sidekiq/web/helpers.rb +137 -106
  53. data/lib/sidekiq/web/router.rb +23 -19
  54. data/lib/sidekiq/web.rb +68 -107
  55. data/lib/sidekiq/worker_compatibility_alias.rb +13 -0
  56. data/lib/sidekiq.rb +92 -182
  57. data/sidekiq.gemspec +25 -16
  58. data/web/assets/images/apple-touch-icon.png +0 -0
  59. data/web/assets/javascripts/application.js +131 -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 +168 -0
  64. data/web/assets/javascripts/dashboard.js +36 -292
  65. data/web/assets/javascripts/metrics.js +264 -0
  66. data/web/assets/stylesheets/application-dark.css +147 -0
  67. data/web/assets/stylesheets/application-rtl.css +2 -95
  68. data/web/assets/stylesheets/application.css +102 -522
  69. data/web/locales/ar.yml +71 -65
  70. data/web/locales/cs.yml +62 -62
  71. data/web/locales/da.yml +60 -53
  72. data/web/locales/de.yml +65 -53
  73. data/web/locales/el.yml +43 -24
  74. data/web/locales/en.yml +84 -66
  75. data/web/locales/es.yml +70 -54
  76. data/web/locales/fa.yml +65 -65
  77. data/web/locales/fr.yml +83 -62
  78. data/web/locales/gd.yml +99 -0
  79. data/web/locales/he.yml +65 -64
  80. data/web/locales/hi.yml +59 -59
  81. data/web/locales/it.yml +53 -53
  82. data/web/locales/ja.yml +75 -64
  83. data/web/locales/ko.yml +52 -52
  84. data/web/locales/lt.yml +83 -0
  85. data/web/locales/nb.yml +61 -61
  86. data/web/locales/nl.yml +52 -52
  87. data/web/locales/pl.yml +45 -45
  88. data/web/locales/pt-br.yml +83 -55
  89. data/web/locales/pt.yml +51 -51
  90. data/web/locales/ru.yml +68 -63
  91. data/web/locales/sv.yml +53 -53
  92. data/web/locales/ta.yml +60 -60
  93. data/web/locales/uk.yml +62 -61
  94. data/web/locales/ur.yml +64 -64
  95. data/web/locales/vi.yml +83 -0
  96. data/web/locales/zh-cn.yml +43 -16
  97. data/web/locales/zh-tw.yml +42 -8
  98. data/web/views/_footer.erb +6 -3
  99. data/web/views/_job_info.erb +21 -4
  100. data/web/views/_metrics_period_select.erb +12 -0
  101. data/web/views/_nav.erb +1 -1
  102. data/web/views/_paging.erb +2 -0
  103. data/web/views/_poll_link.erb +3 -6
  104. data/web/views/_summary.erb +7 -7
  105. data/web/views/busy.erb +75 -25
  106. data/web/views/dashboard.erb +58 -18
  107. data/web/views/dead.erb +3 -3
  108. data/web/views/layout.erb +3 -1
  109. data/web/views/metrics.erb +82 -0
  110. data/web/views/metrics_for_job.erb +68 -0
  111. data/web/views/morgue.erb +14 -15
  112. data/web/views/queue.erb +33 -24
  113. data/web/views/queues.erb +13 -3
  114. data/web/views/retries.erb +16 -17
  115. data/web/views/retry.erb +3 -3
  116. data/web/views/scheduled.erb +17 -15
  117. metadata +70 -71
  118. data/.circleci/config.yml +0 -61
  119. data/.github/contributing.md +0 -32
  120. data/.github/issue_template.md +0 -11
  121. data/.gitignore +0 -15
  122. data/.travis.yml +0 -11
  123. data/3.0-Upgrade.md +0 -70
  124. data/4.0-Upgrade.md +0 -53
  125. data/5.0-Upgrade.md +0 -56
  126. data/COMM-LICENSE +0 -97
  127. data/Ent-Changes.md +0 -238
  128. data/Gemfile +0 -19
  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-Changes.md +0 -759
  134. data/Rakefile +0 -9
  135. data/bin/sidekiqctl +0 -20
  136. data/code_of_conduct.md +0 -50
  137. data/lib/generators/sidekiq/worker_generator.rb +0 -49
  138. data/lib/sidekiq/core_ext.rb +0 -1
  139. data/lib/sidekiq/ctl.rb +0 -221
  140. data/lib/sidekiq/delay.rb +0 -42
  141. data/lib/sidekiq/exception_handler.rb +0 -29
  142. data/lib/sidekiq/extensions/action_mailer.rb +0 -57
  143. data/lib/sidekiq/extensions/active_record.rb +0 -40
  144. data/lib/sidekiq/extensions/class_methods.rb +0 -40
  145. data/lib/sidekiq/extensions/generic_proxy.rb +0 -31
  146. data/lib/sidekiq/logging.rb +0 -122
  147. data/lib/sidekiq/middleware/server/active_record.rb +0 -23
  148. data/lib/sidekiq/util.rb +0 -66
  149. data/lib/sidekiq/worker.rb +0 -220
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 22b205223a123bbe3a8812f1e2804be148afb5fe91c201ecb9a073eb4a188a06
4
- data.tar.gz: '08ab2999267df91afb8f62b9a6b00810299791cad99763d5b16f70bda946410a'
3
+ metadata.gz: 03e85917d2ea03bf226aa6922510b627931c326eb31badf50cc23f39182fc409
4
+ data.tar.gz: '00180ea8ecb3013a8a405eecd0c6051c3611de72e668a9ce1da695fdbfd34a59'
5
5
  SHA512:
6
- metadata.gz: ad90b8ed3b060ce4521326a0dd4173550ee6bf64b0674fc08fbf37770aaec5ca0ea82738ed1730ccfcff4e0b616afcc47789ca8610cdd41a20abc0ef7d734891
7
- data.tar.gz: 2ed367f9801d28616a1b56b0b209cfe797c2b5a137d2e67cfb8c6864c8d5ed8f58992924ddce654f1fec53b84a5f18abdf88d4df45373b98f46786d511bac3f2
6
+ metadata.gz: 607e2599f0500af84ced9b8e0b4ed34d1cf947d1e0c7d144ab1a03f5f0652cdda97d097422b6beba8b76f5c78381d29cdde784b1c7463aa006d009304739acaa
7
+ data.tar.gz: 9a7758f5bd266711d56bd2df5275d9d942d1ca3e586f5e5eb945dd2a62a7bac5f4f54f058d41a2c747da301d691c7cceb47ef641f2d0a2cc2716051914d9646a
data/Changes.md CHANGED
@@ -1,6 +1,538 @@
1
1
  # Sidekiq Changes
2
2
 
3
- [Sidekiq Changes](https://github.com/mperham/sidekiq/blob/master/Changes.md) | [Sidekiq Pro Changes](https://github.com/mperham/sidekiq/blob/master/Pro-Changes.md) | [Sidekiq Enterprise Changes](https://github.com/mperham/sidekiq/blob/master/Ent-Changes.md)
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.1.3
6
+ ----------
7
+
8
+ - Add `sidekiq_options retry_for: 48.hours` to allow time-based retry windows [#6029]
9
+ - Support sidekiq_retry_in and sidekiq_retries_exhausted_block in ActiveJobs (#5994)
10
+ - Lowercase all Rack headers for Rack 3.0 [#5951]
11
+ - Validate Sidekiq::Web page refresh delay to avoid potential DoS,
12
+ CVE-2023-26141, thanks for reporting Keegan!
13
+
14
+ 7.1.2
15
+ ----------
16
+
17
+ - Mark Web UI assets as private so CDNs won't cache them [#5936]
18
+ - Fix stackoverflow when using Oj and the JSON log formatter [#5920]
19
+ - Remove spurious `enqueued_at` from scheduled ActiveJobs [#5937]
20
+
21
+ 7.1.1
22
+ ----------
23
+
24
+ - Support multiple CurrentAttributes [#5904]
25
+ - Speed up latency fetch with large queues on Redis <7 [#5910]
26
+ - Allow a larger default client pool [#5886]
27
+ - Ensure Sidekiq.options[:environment] == RAILS_ENV [#5932]
28
+
29
+ 7.1.0
30
+ ----------
31
+
32
+ - Improve display of ActiveJob arguments in Web UI [#5825, cover]
33
+ - Update `push_bulk` to push `batch_size` jobs at a time and allow laziness [#5827, fatkodima]
34
+ This allows Sidekiq::Client to push unlimited jobs as long as it has enough memory for the batch_size.
35
+ - Update `perform_bulk` to use `push_bulk` internally.
36
+ - Change return value of `push_bulk` to map 1-to-1 with arguments.
37
+ If you call `push_bulk(args: [[1], [2], [3]])`, you will now always get
38
+ an array of 3 values as the result: `["jid1", nil, "jid3"]` where nil means
39
+ that particular job did not push successfully (possibly due to middleware
40
+ stopping it). Previously nil values were removed so it was impossible to tell
41
+ which jobs pushed successfully and which did not.
42
+ - Migrate away from all deprecated Redis commands [#5788]
43
+ Sidekiq will now print a warning if you use one of those deprecated commands.
44
+ - Prefix all Sidekiq thread names [#5872]
45
+
46
+ 7.0.9
47
+ ----------
48
+
49
+ - Restore confirmation dialogs in Web UI [#5881, shevaun]
50
+ - Increase fetch timeout to minimize ReadTimeoutError [#5874]
51
+ - Reverse histogram tooltip ordering [#5868]
52
+ - Add Scottish Gaelic (gd) locale [#5867, GunChleoc]
53
+
54
+ 7.0.8
55
+ ----------
56
+
57
+ - **SECURITY** Sanitize `period` input parameter on Metrics pages.
58
+ Specially crafted values can lead to XSS. This functionality
59
+ was introduced in 7.0.4. Thank you to spercex @ huntr.dev [#5694]
60
+ - Add job hash as 3rd parameter to the `sidekiq_retry_in` block.
61
+
62
+ 7.0.7
63
+ ----------
64
+
65
+ - Fix redis-client API usage which could result in stuck Redis
66
+ connections [#5823]
67
+ - Fix AS::Duration with `sidekiq_retry_in` [#5806]
68
+ - Restore dumping config options on startup with `-v` [#5822]
69
+
70
+ 7.0.5,7.0.6
71
+ ----------
72
+
73
+ - More context for debugging json unsafe errors [#5787]
74
+
75
+ 7.0.4
76
+ ----------
77
+
78
+ - Performance and memory optimizations [#5768, fatkodima]
79
+ - Add 1-8 hour period selector to Metrics pages [#5694]
80
+ - Fix process display with `sidekiqmon` [#5733]
81
+
82
+ 7.0.3
83
+ ----------
84
+
85
+ - Don't warn about memory policy on Redis Enterprise [#5712]
86
+ - Don't allow Quiet/Stop on embedded Sidekiq instances [#5716]
87
+ - Fix `size: X` for configuring the default Redis pool size [#5702]
88
+ - Improve the display of queue weights on Busy page [#5642]
89
+ - Freeze CurrentAttributes on a job once initially set [#5692]
90
+
91
+ 7.0.2
92
+ ----------
93
+
94
+ - Improve compatibility with custom loggers [#5673]
95
+ - Add queue weights on Busy page [#5640]
96
+ - Add BID link on job_info page if job is part of a Batch [#5623]
97
+ - Allow custom extensions to add rows/links within Job detail pages [#5624]
98
+ ```ruby
99
+ Sidekiq::Web.custom_job_info_rows << AddAccountLink.new
100
+
101
+ class AddAccountLink
102
+ include CGI::Util
103
+ def add_pair(job)
104
+ # yield a (name, value) pair
105
+ # You can include HTML tags and CSS, Sidekiq does not do any
106
+ # escaping so beware user data injection! Note how we use CGI's
107
+ # `h` escape helper.
108
+ aid = job["account_id"]
109
+ yield "Account", "<a href='/accounts/#{h aid}'>#{h aid}</a>" if aid
110
+ end
111
+ end
112
+ ```
113
+
114
+ 7.0.1
115
+ ----------
116
+
117
+ - Allow an embedding process to reuse its own heartbeat thread
118
+ - Update zh-cn localization
119
+
120
+ 7.0.0
121
+ ----------
122
+
123
+ - Embedded mode!
124
+ - Capsules!!
125
+ - Job Execution metrics!!!
126
+ - See `docs/7.0-Upgrade.md` for release notes
127
+
128
+ 6.5.9
129
+ ----------
130
+
131
+ - Ensure Sidekiq.options[:environment] == RAILS_ENV [#5932]
132
+
133
+ 6.5.8
134
+ ----------
135
+
136
+ - Fail if using a bad version of scout_apm [#5616]
137
+ - Add pagination to Busy page [#5556]
138
+ - Speed up WorkSet#each [#5559]
139
+ - Adjust CurrentAttributes to work with the String class name so we aren't referencing the Class within a Rails initializer [#5536]
140
+
141
+ 6.5.7
142
+ ----------
143
+
144
+ - Updates for JA and ZH locales
145
+ - Further optimizations for scheduled polling [#5513]
146
+
147
+ 6.5.6
148
+ ----------
149
+
150
+ - Fix deprecation warnings with redis-rb 4.8.0 [#5484]
151
+ - Lock redis-rb to < 5.0 as we are moving to redis-client in Sidekiq 7.0
152
+
153
+ 6.5.5
154
+ ----------
155
+
156
+ - Fix require issue with job_retry.rb [#5462]
157
+ - Improve Sidekiq::Web compatibility with Rack 3.x
158
+
159
+ 6.5.4
160
+ ----------
161
+
162
+ - Fix invalid code on Ruby 2.5 [#5460]
163
+ - Fix further metrics dependency issues [#5457]
164
+
165
+ 6.5.3
166
+ ----------
167
+
168
+ - Don't require metrics code without explicit opt-in [#5456]
169
+
170
+ 6.5.2
171
+ ----------
172
+
173
+ - [Job Metrics are under active development, help wanted!](https://github.com/sidekiq/sidekiq/wiki/Metrics#contributing) **BETA**
174
+ - Add `Context` column on queue page which shows any CurrentAttributes [#5450]
175
+ - `sidekiq_retry_in` may now return `:discard` or `:kill` to dynamically stop job retries [#5406]
176
+ - Smarter sorting of processes in /busy Web UI [#5398]
177
+ - Fix broken hamburger menu in mobile UI [#5428]
178
+ - Require redis-rb 4.5.0. Note that Sidekiq will break if you use the
179
+ [`Redis.exists_returns_integer = false`](https://github.com/redis/redis-rb/blob/master/CHANGELOG.md#450) flag. [#5394]
180
+
181
+ 6.5.1
182
+ ----------
183
+
184
+ - Fix `push_bulk` breakage [#5387]
185
+
186
+ 6.5.0
187
+ ---------
188
+
189
+ - Substantial refactoring of Sidekiq server internals, part of a larger effort
190
+ 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).
191
+ - **Add beta support for the `redis-client` gem**. This will become the default Redis driver in Sidekiq 7.0. [#5298]
192
+ Read more: https://github.com/sidekiq/sidekiq/wiki/Using-redis-client
193
+ - **Add beta support for DB transaction-aware client** [#5291]
194
+ Add this line to your initializer and any jobs created during a transaction
195
+ will only be pushed to Redis **after the transaction commits**. You will need to add the
196
+ `after_commit_everywhere` gem to your Gemfile.
197
+ ```ruby
198
+ Sidekiq.transactional_push!
199
+ ```
200
+ This feature does not have a lot of production usage yet; please try it out and let us
201
+ know if you have any issues. It will be fully supported in Sidekiq 7.0 or removed if it
202
+ proves problematic.
203
+ - Fix regression with middleware arguments [#5312]
204
+
205
+ 6.4.2
206
+ ---------
207
+
208
+ - Strict argument checking now runs after client-side middleware [#5246]
209
+ - Fix page events with live polling [#5184]
210
+ - Many under-the-hood changes to remove all usage of the term "worker"
211
+ from the Sidekiq codebase and APIs. This mostly involved RDoc and local
212
+ variable names but a few constants and public APIs were changed. The old
213
+ APIs will be removed in Sidekiq 7.0.
214
+ ```
215
+ Sidekiq::DEFAULT_WORKER_OPTIONS -> Sidekiq.default_job_options
216
+ Sidekiq.default_worker_options -> Sidekiq.default_job_options
217
+ Sidekiq::Queues["default"].jobs_by_worker(HardJob) -> Sidekiq::Queues["default"].jobs_by_class(HardJob)
218
+ ```
219
+
220
+ 6.4.1
221
+ ---------
222
+
223
+ - Fix pipeline/multi deprecations in redis-rb 4.6
224
+ - Fix sidekiq.yml YAML load errors on Ruby 3.1 [#5141]
225
+ - Sharding support for `perform_bulk` [#5129]
226
+ - Refactor job logger for SPEEEEEEED
227
+
228
+ 6.4.0
229
+ ---------
230
+
231
+ - **SECURITY**: Validate input to avoid possible DoS in Web UI.
232
+ - Add **strict argument checking** [#5071]
233
+ Sidekiq will now log a warning if JSON-unsafe arguments are passed to `perform_async`.
234
+ Add `Sidekiq.strict_args!(false)` to your initializer to disable this warning.
235
+ This warning will switch to an exception in Sidekiq 7.0.
236
+ - Note that Delayed Extensions will be removed in Sidekiq 7.0 [#5076]
237
+ - Add `perform_{inline,sync}` in Sidekiq::Job to run a job synchronously [#5061, hasan-ally]
238
+ ```ruby
239
+ SomeJob.perform_async(args...)
240
+ SomeJob.perform_sync(args...)
241
+ SomeJob.perform_inline(args...)
242
+ ```
243
+ You can also dynamically redirect a job to run synchronously:
244
+ ```ruby
245
+ SomeJob.set("sync": true).perform_async(args...) # will run via perform_inline
246
+ ```
247
+ - Replace Sidekiq::Worker `app/workers` generator with Sidekiq::Job `app/sidekiq` generator [#5055]
248
+ ```
249
+ bin/rails generate sidekiq:job ProcessOrderJob
250
+ ```
251
+ - Fix job retries losing CurrentAttributes [#5090]
252
+ - Tweak shutdown to give long-running threads time to cleanup [#5095]
253
+
254
+ 6.3.1
255
+ ---------
256
+
257
+ - Fix keyword arguments error with CurrentAttributes on Ruby 3.0 [#5048]
258
+
259
+ 6.3.0
260
+ ---------
261
+
262
+ - **BREAK**: The Web UI has been refactored to remove jQuery. Any UI extensions
263
+ which use jQuery will break.
264
+ - **FEATURE**: Sidekiq.logger has been enhanced so any `Rails.logger`
265
+ output in jobs now shows up in the Sidekiq console. Remove any logger
266
+ hacks in your initializer and see if it Just Works™ now. [#5021]
267
+ - **FEATURE**: Add `Sidekiq::Job` alias for `Sidekiq::Worker`, to better
268
+ reflect industry standard terminology. You can now do this:
269
+ ```ruby
270
+ class MyJob
271
+ include Sidekiq::Job
272
+ sidekiq_options ...
273
+ def perform(args)
274
+ end
275
+ end
276
+ ```
277
+ - **FEATURE**: Support for serializing ActiveSupport::CurrentAttributes into each job. [#4982]
278
+ ```ruby
279
+ # config/initializers/sidekiq.rb
280
+ require "sidekiq/middleware/current_attributes"
281
+ Sidekiq::CurrentAttributes.persist(Myapp::Current) # Your AS::CurrentAttributes singleton
282
+ ```
283
+ - **FEATURE**: Add `Sidekiq::Worker.perform_bulk` for enqueuing jobs in bulk,
284
+ similar to `Sidekiq::Client.push_bulk` [#5042]
285
+ ```ruby
286
+ MyJob.perform_bulk([[1], [2], [3]])
287
+ ```
288
+ - Implement `queue_as`, `wait` and `wait_until` for ActiveJob compatibility [#5003]
289
+ - Scheduler now uses Lua to reduce Redis load and network roundtrips [#5044]
290
+ - Retry Redis operation if we get an `UNBLOCKED` Redis error [#4985]
291
+ - Run existing signal traps, if any, before running Sidekiq's trap [#4991]
292
+ - Fix fetch bug when using weighted queues which caused Sidekiq to stop
293
+ processing queues randomly [#5031]
294
+
295
+ 6.2.2
296
+ ---------
297
+
298
+ - Reduce retry jitter, add jitter to `sidekiq_retry_in` values [#4957]
299
+ - Minimize scheduler load on Redis at scale [#4882]
300
+ - Improve logging of delay jobs [#4904, BuonOno]
301
+ - Minor CSS improvements for buttons and tables, design PRs always welcome!
302
+ - Tweak Web UI `Cache-Control` header [#4966]
303
+ - Rename internal API class `Sidekiq::Job` to `Sidekiq::JobRecord` [#4955]
304
+
305
+ 6.2.1
306
+ ---------
307
+
308
+ - Update RTT warning logic to handle transient RTT spikes [#4851]
309
+ - Fix very low priority CVE on unescaped queue name [#4852]
310
+ - Add note about sessions and Rails apps in API mode
311
+
312
+ 6.2.0
313
+ ---------
314
+
315
+ - Store Redis RTT and log if poor [#4824]
316
+ - Add process/thread stats to Busy page [#4806]
317
+ - Improve Web UI on mobile devices [#4840]
318
+ - **Refactor Web UI session usage** [#4804]
319
+ Numerous people have hit "Forbidden" errors and struggled with Sidekiq's
320
+ Web UI session requirement. If you have code in your initializer for
321
+ Web sessions, it's quite possible it will need to be removed. Here's
322
+ an overview:
323
+ ```
324
+ Sidekiq::Web needs a valid Rack session for CSRF protection. If this is a Rails app,
325
+ make sure you mount Sidekiq::Web *inside* your routes in `config/routes.rb` so
326
+ Sidekiq can reuse the Rails session:
327
+
328
+ Rails.application.routes.draw do
329
+ mount Sidekiq::Web => "/sidekiq"
330
+ ....
331
+ end
332
+
333
+ If this is a bare Rack app, use a session middleware before Sidekiq::Web:
334
+
335
+ # first, use IRB to create a shared secret key for sessions and commit it
336
+ require 'securerandom'; File.open(".session.key", "w") {|f| f.write(SecureRandom.hex(32)) }
337
+
338
+ # now, update your Rack app to include the secret with a session cookie middleware
339
+ use Rack::Session::Cookie, secret: File.read(".session.key"), same_site: true, max_age: 86400
340
+ run Sidekiq::Web
341
+
342
+ If this is a Rails app in API mode, you need to enable sessions.
343
+
344
+ https://guides.rubyonrails.org/api_app.html#using-session-middlewares
345
+ ```
346
+
347
+ 6.1.3
348
+ ---------
349
+
350
+ - Warn if Redis is configured to evict data under memory pressure [#4752]
351
+ - Add process RSS on the Busy page [#4717]
352
+
353
+ 6.1.2
354
+ ---------
355
+
356
+ - Improve readability in dark mode Web UI [#4674]
357
+ - Fix Web UI crash with corrupt session [#4672]
358
+ - Allow middleware to yield arguments [#4673, @eugeneius]
359
+ - Migrate CI from CircleCI to GitHub Actions [#4677]
360
+
361
+ 6.1.1
362
+ ---------
363
+
364
+ - Jobs are now sorted by age in the Busy Workers table. [#4641]
365
+ - Fix "check all" JS logic in Web UI [#4619]
366
+
367
+ 6.1.0
368
+ ---------
369
+
370
+ - Web UI - Dark Mode fixes [#4543, natematykiewicz]
371
+ - Ensure `Rack::ContentLength` is loaded as middleware for correct Web UI responses [#4541]
372
+ - Avoid exception dumping SSL store in Redis connection logging [#4532]
373
+ - Better error messages in Sidekiq::Client [#4549]
374
+ - Remove rack-protection, reimplement CSRF protection [#4588]
375
+ - Require redis-rb 4.2 [#4591]
376
+ - Update to jquery 1.12.4 [#4593]
377
+ - Refactor internal fetch logic and API [#4602]
378
+
379
+ 6.0.7
380
+ ---------
381
+
382
+ - Refactor systemd integration to work better with custom binaries [#4511]
383
+ - Don't connect to Redis at process exit if not needed [#4502]
384
+ - Remove Redis connection naming [#4479]
385
+ - Fix Redis Sentinel password redaction [#4499]
386
+ - Add Vietnamese locale (vi) [#4528]
387
+
388
+ 6.0.6
389
+ ---------
390
+
391
+ - **Integrate with systemd's watchdog and notification features** [#4488]
392
+ Set `Type=notify` in [sidekiq.service](https://github.com/sidekiq/sidekiq/blob/4b8a8bd3ae42f6e48ae1fdaf95ed7d7af18ed8bb/examples/systemd/sidekiq.service#L30-L39). The integration works automatically.
393
+ - Use `setTimeout` rather than `setInterval` to avoid thundering herd [#4480]
394
+ - Fix edge case where a job can be pushed without a queue.
395
+ - Flush job stats at exit [#4498]
396
+ - Check RAILS_ENV before RACK_ENV [#4493]
397
+ - Add Lithuanian locale [#4476]
398
+
399
+ 6.0.5
400
+ ---------
401
+
402
+ - Fix broken Web UI response when using NewRelic and Rack 2.1.2+. [#4440]
403
+ - Update APIs to use `UNLINK`, not `DEL`. [#4449]
404
+ - Fix Ruby 2.7 warnings [#4412]
405
+ - Add support for `APP_ENV` [[95fa5d9]](https://github.com/sidekiq/sidekiq/commit/95fa5d90192148026e52ca2902f1b83c70858ce8)
406
+
407
+ 6.0.4
408
+ ---------
409
+
410
+ - Fix ActiveJob's `sidekiq_options` integration [#4404]
411
+ - Sidekiq Pro users will now see a Pause button next to each queue in
412
+ the Web UI, allowing them to pause queues manually [#4374, shayonj]
413
+ - Fix Sidekiq::Workers API unintentional change in 6.0.2 [#4387]
414
+
415
+
416
+ 6.0.3
417
+ ---------
418
+
419
+ - Fix `Sidekiq::Client.push_bulk` API which was erroneously putting
420
+ invalid `at` values in the job payloads [#4321]
421
+
422
+ 6.0.2
423
+ ---------
424
+
425
+ - Fix Sidekiq Enterprise's rolling restart functionality, broken by refactoring in 6.0.0. [#4334]
426
+ - More internal refactoring and performance tuning [fatkodima]
427
+
428
+ 6.0.1
429
+ ---------
430
+
431
+ - **Performance tuning**, Sidekiq should be 10-15% faster now [#4303, 4299,
432
+ 4269, fatkodima]
433
+ - **Dark Mode support in Web UI** (further design polish welcome!) [#4227, mperham,
434
+ fatkodima, silent-e]
435
+ - **Job-specific log levels**, allowing you to turn on debugging for
436
+ problematic workers. [fatkodima, #4287]
437
+ ```ruby
438
+ MyWorker.set(log_level: :debug).perform_async(...)
439
+ ```
440
+ - **Ad-hoc job tags**. You can tag your jobs with, e.g, subdomain, tenant, country,
441
+ locale, application, version, user/client, "alpha/beta/pro/ent", types of jobs,
442
+ teams/people responsible for jobs, additional metadata, etc.
443
+ Tags are shown on different pages with job listings. Sidekiq Pro users
444
+ can filter based on them [fatkodima, #4280]
445
+ ```ruby
446
+ class MyWorker
447
+ include Sidekiq::Worker
448
+ sidekiq_options tags: ['bank-ops', 'alpha']
449
+ ...
450
+ end
451
+ ```
452
+ - Fetch scheduled jobs in batches before pushing into specific queues.
453
+ This will decrease enqueueing time of scheduled jobs by a third. [fatkodima, #4273]
454
+ ```
455
+ ScheduledSet with 10,000 jobs
456
+ Before: 56.6 seconds
457
+ After: 39.2 seconds
458
+ ```
459
+ - Compress error backtraces before pushing into Redis, if you are
460
+ storing error backtraces, this will halve the size of your RetrySet
461
+ in Redis [fatkodima, #4272]
462
+ ```
463
+ RetrySet with 100,000 jobs
464
+ Before: 261 MB
465
+ After: 129 MB
466
+ ```
467
+ - Support display of ActiveJob 6.0 payloads in the Web UI [#4263]
468
+ - Add `SortedSet#scan` for pattern based scanning. For large sets this API will be **MUCH** faster
469
+ than standard iteration using each. [fatkodima, #4262]
470
+ ```ruby
471
+ Sidekiq::DeadSet.new.scan("UnreliableApi") do |job|
472
+ job.retry
473
+ end
474
+ ```
475
+ - Dramatically speed up SortedSet#find\_job(jid) by using Redis's ZSCAN
476
+ support, approx 10x faster. [fatkodima, #4259]
477
+ ```
478
+ zscan 0.179366 0.047727 0.227093 ( 1.161376)
479
+ enum 8.522311 0.419826 8.942137 ( 9.785079)
480
+ ```
481
+ - Respect rails' generators `test_framework` option and gracefully handle extra `worker` suffix on generator [fatkodima, #4256]
482
+ - Add ability to sort 'Enqueued' page on Web UI by position in the queue [fatkodima, #4248]
483
+ - Support `Client.push_bulk` with different delays [fatkodima, #4243]
484
+ ```ruby
485
+ Sidekiq::Client.push_bulk("class" => FooJob, "args" => [[1], [2]], "at" => [1.minute.from_now.to_f, 5.minutes.from_now.to_f])
486
+ ```
487
+ - Easier way to test enqueuing specific ActionMailer and ActiveRecord delayed jobs. Instead of manually
488
+ parsing embedded class, you can now test by fetching jobs for specific classes. [fatkodima, #4292]
489
+ ```ruby
490
+ assert_equal 1, Sidekiq::Extensions::DelayedMailer.jobs_for(FooMailer).size
491
+ ```
492
+ - Add `sidekiqmon` to gemspec executables [#4242]
493
+ - Gracefully handle `Sidekiq.logger = nil` [#4240]
494
+ - Inject Sidekiq::LogContext module if user-supplied logger does not include it [#4239]
495
+
496
+ 6.0
497
+ ---------
498
+
499
+ This release has major breaking changes. Read and test carefully in production.
500
+
501
+ - With Rails 6.0.2+, ActiveJobs can now use `sidekiq_options` directly to configure Sidekiq
502
+ features/internals like the retry subsystem. [#4213, pirj]
503
+ ```ruby
504
+ class MyJob < ActiveJob::Base
505
+ queue_as :myqueue
506
+ sidekiq_options retry: 10, backtrace: 20
507
+ def perform(...)
508
+ end
509
+ end
510
+ ```
511
+ - Logging has been redesigned to allow for pluggable log formatters:
512
+ ```ruby
513
+ Sidekiq.configure_server do |config|
514
+ config.log_formatter = Sidekiq::Logger::Formatters::JSON.new
515
+ end
516
+ ```
517
+ See the [Logging wiki page](https://github.com/sidekiq/sidekiq/wiki/Logging) for more details.
518
+ - **BREAKING CHANGE** Validate proper usage of the `REDIS_PROVIDER`
519
+ variable. This variable is meant to hold the name of the environment
520
+ variable which contains your Redis URL, so that you can switch Redis
521
+ providers quickly and easily with a single variable change. It is not
522
+ meant to hold the actual Redis URL itself. If you want to manually set
523
+ the Redis URL (not recommended as it implies you have no failover),
524
+ then you may set `REDIS_URL` directly. [#3969]
525
+ - **BREAKING CHANGE** Increase default shutdown timeout from 8 seconds
526
+ to 25 seconds. Both Heroku and ECS now use 30 second shutdown timeout
527
+ by default and we want Sidekiq to take advantage of this time. If you
528
+ have deployment scripts which depend on the old default timeout, use `-t 8` to
529
+ get the old behavior. [#3968]
530
+ - **BREAKING CHANGE** Remove the daemonization, logfile and pidfile
531
+ arguments to Sidekiq. Use a proper process supervisor (e.g. systemd or
532
+ foreman) to manage Sidekiq. See the Deployment wiki page for links to
533
+ more resources.
534
+ - Integrate the StandardRB code formatter to ensure consistent code
535
+ styling. [#4114, gearnode]
4
536
 
5
537
  5.2.10
6
538
  ---------
@@ -174,7 +706,7 @@ Sidekiq::Middleware::Server::Logging -> Sidekiq::JobLogger
174
706
  - The `SomeWorker.set(options)` API was re-written to avoid thread-local state. [#2152]
175
707
  - Sidekiq Enterprise's encrypted jobs now display "[encrypted data]" in the Web UI instead
176
708
  of random hex bytes.
177
- - Please see the [5.0 Upgrade notes](5.0-Upgrade.md) for more detail.
709
+ - Please see the [5.0 Upgrade notes](docs/5.0-Upgrade.md) for more detail.
178
710
 
179
711
  4.2.10
180
712
  -----------
@@ -392,7 +924,7 @@ Sidekiq::Queues.clear_all
392
924
  - Sidekiq's internals have been completely overhauled for performance
393
925
  and to remove dependencies. This has resulted in major speedups, as
394
926
  [detailed on my blog](http://www.mikeperham.com/2015/10/14/optimizing-sidekiq/).
395
- - See the [4.0 upgrade notes](4.0-Upgrade.md) for more detail.
927
+ - See the [4.0 upgrade notes](docs/4.0-Upgrade.md) for more detail.
396
928
 
397
929
  3.5.4
398
930
  -----------
@@ -429,7 +961,7 @@ Sidekiq::Queues.clear_all
429
961
  - **FIX MEMORY LEAK** Under rare conditions, threads may leak [#2598, gazay]
430
962
  - Add Ukrainian locale [#2561, elrakita]
431
963
  - Disconnect and retry Redis operations if we see a READONLY error [#2550]
432
- - Add server middleware testing harness; see [wiki](https://github.com/mperham/sidekiq/wiki/Testing#testing-server-middleware) [#2534, ryansch]
964
+ - Add server middleware testing harness; see [wiki](https://github.com/sidekiq/sidekiq/wiki/Testing#testing-server-middleware) [#2534, ryansch]
433
965
 
434
966
  3.5.0
435
967
  -----------
@@ -447,7 +979,7 @@ Sidekiq::Queues.clear_all
447
979
  - Fix CSRF vulnerability in Web UI, thanks to Egor Homakov for
448
980
  reporting. [#2422] If you are running the Web UI as a standalone Rack app,
449
981
  ensure you have a [session middleware
450
- configured](https://github.com/mperham/sidekiq/wiki/Monitoring#standalone):
982
+ configured](https://github.com/sidekiq/sidekiq/wiki/Monitoring#standalone):
451
983
  ```ruby
452
984
  use Rack::Session::Cookie, :secret => "some unique secret string here"
453
985
  ```
@@ -659,7 +1191,7 @@ sidekiq_options :dead => false, :retry => 5
659
1191
  3.0.0
660
1192
  -----------
661
1193
 
662
- Please see [3.0-Upgrade.md](3.0-Upgrade.md) for more comprehensive upgrade notes.
1194
+ Please see [3.0-Upgrade.md](docs/3.0-Upgrade.md) for more comprehensive upgrade notes.
663
1195
 
664
1196
  - **Dead Job Queue** - jobs which run out of retries are now moved to a dead
665
1197
  job queue. These jobs must be retried manually or they will expire
@@ -703,7 +1235,7 @@ Sidekiq::Client.via(ConnectionPool.new { Redis.new }) do
703
1235
  end
704
1236
  ```
705
1237
  **Sharding support does require a breaking change to client-side
706
- middleware, see 3.0-Upgrade.md.**
1238
+ middleware, see docs/3.0-Upgrade.md.**
707
1239
  - New Chinese, Greek, Swedish and Czech translations for the Web UI.
708
1240
  - Updated most languages translations for the new UI features.
709
1241
  - **Remove official Capistrano integration** - this integration has been
@@ -831,7 +1363,7 @@ middleware, see 3.0-Upgrade.md.**
831
1363
  appear to be doing any work. [#1194]
832
1364
  - Sidekiq's testing behavior is now dynamic. You can choose between
833
1365
  `inline` and `fake` behavior in your tests. See
834
- [Testing](https://github.com/mperham/sidekiq/wiki/Testing) for detail. [#1193]
1366
+ [Testing](https://github.com/sidekiq/sidekiq/wiki/Testing) for detail. [#1193]
835
1367
  - The Retries table has a new column for the error message.
836
1368
  - The Web UI topbar now contains the status and live poll button.
837
1369
  - Orphaned worker records are now auto-vacuumed when you visit the
data/LICENSE.txt ADDED
@@ -0,0 +1,9 @@
1
+ Copyright (c) Contributed Systems LLC
2
+
3
+ Sidekiq is an Open Source project licensed under the terms of
4
+ the LGPLv3 license. Please see <http://www.gnu.org/licenses/lgpl-3.0.html>
5
+ for license text.
6
+
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.