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