sidekiq 7.0.0 → 7.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Changes.md +261 -13
- data/README.md +34 -27
- data/bin/multi_queue_bench +271 -0
- data/bin/sidekiqload +204 -109
- data/bin/sidekiqmon +3 -0
- data/lib/sidekiq/api.rb +151 -23
- data/lib/sidekiq/capsule.rb +20 -0
- data/lib/sidekiq/cli.rb +9 -4
- data/lib/sidekiq/client.rb +40 -24
- data/lib/sidekiq/component.rb +3 -1
- data/lib/sidekiq/config.rb +32 -12
- data/lib/sidekiq/deploy.rb +5 -5
- data/lib/sidekiq/embedded.rb +3 -3
- data/lib/sidekiq/fetch.rb +3 -5
- data/lib/sidekiq/iterable_job.rb +53 -0
- data/lib/sidekiq/job/interrupt_handler.rb +22 -0
- data/lib/sidekiq/job/iterable/active_record_enumerator.rb +53 -0
- data/lib/sidekiq/job/iterable/csv_enumerator.rb +47 -0
- data/lib/sidekiq/job/iterable/enumerators.rb +135 -0
- data/lib/sidekiq/job/iterable.rb +231 -0
- data/lib/sidekiq/job.rb +17 -10
- data/lib/sidekiq/job_logger.rb +24 -11
- data/lib/sidekiq/job_retry.rb +34 -11
- data/lib/sidekiq/job_util.rb +51 -15
- data/lib/sidekiq/launcher.rb +38 -22
- data/lib/sidekiq/logger.rb +1 -1
- data/lib/sidekiq/metrics/query.rb +6 -3
- data/lib/sidekiq/metrics/shared.rb +4 -4
- data/lib/sidekiq/metrics/tracking.rb +9 -3
- data/lib/sidekiq/middleware/chain.rb +12 -9
- data/lib/sidekiq/middleware/current_attributes.rb +70 -17
- data/lib/sidekiq/monitor.rb +17 -4
- data/lib/sidekiq/paginator.rb +4 -4
- data/lib/sidekiq/processor.rb +41 -27
- data/lib/sidekiq/rails.rb +18 -8
- data/lib/sidekiq/redis_client_adapter.rb +31 -35
- data/lib/sidekiq/redis_connection.rb +29 -7
- data/lib/sidekiq/scheduled.rb +4 -4
- data/lib/sidekiq/testing.rb +27 -8
- data/lib/sidekiq/transaction_aware_client.rb +7 -0
- data/lib/sidekiq/version.rb +1 -1
- data/lib/sidekiq/web/action.rb +10 -4
- data/lib/sidekiq/web/application.rb +113 -16
- data/lib/sidekiq/web/csrf_protection.rb +9 -6
- data/lib/sidekiq/web/helpers.rb +104 -33
- data/lib/sidekiq/web.rb +63 -2
- data/lib/sidekiq.rb +2 -1
- data/sidekiq.gemspec +8 -29
- data/web/assets/javascripts/application.js +45 -0
- data/web/assets/javascripts/dashboard-charts.js +38 -12
- data/web/assets/javascripts/dashboard.js +8 -10
- data/web/assets/javascripts/metrics.js +64 -2
- data/web/assets/stylesheets/application-dark.css +4 -0
- data/web/assets/stylesheets/application-rtl.css +10 -0
- data/web/assets/stylesheets/application.css +38 -4
- data/web/locales/da.yml +11 -4
- data/web/locales/en.yml +2 -0
- data/web/locales/fr.yml +14 -0
- data/web/locales/gd.yml +99 -0
- data/web/locales/ja.yml +3 -1
- data/web/locales/pt-br.yml +20 -0
- data/web/locales/tr.yml +101 -0
- data/web/locales/zh-cn.yml +20 -19
- data/web/views/_footer.erb +14 -2
- data/web/views/_job_info.erb +18 -2
- data/web/views/_metrics_period_select.erb +12 -0
- data/web/views/_paging.erb +2 -0
- data/web/views/_poll_link.erb +1 -1
- data/web/views/_summary.erb +7 -7
- data/web/views/busy.erb +46 -35
- data/web/views/dashboard.erb +25 -35
- data/web/views/filtering.erb +7 -0
- data/web/views/layout.erb +6 -6
- data/web/views/metrics.erb +42 -31
- data/web/views/metrics_for_job.erb +41 -51
- data/web/views/morgue.erb +5 -9
- data/web/views/queue.erb +10 -14
- data/web/views/queues.erb +9 -3
- data/web/views/retries.erb +5 -9
- data/web/views/scheduled.erb +12 -13
- metadata +37 -32
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34279eae9b8159c48dd31c7b088341136d8b785e7b853389e29e179443af1577
|
4
|
+
data.tar.gz: 520c6f705995df5c8e50e4e607956bcd8fe78d332e9a33fdf7a4ff25b7534f60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 939c535c352b1c9390e7675d75cfc3728685282187c0edd8475373c6bad1ee67391477a46e26ea3de06724e8cf2570ef759862eb37234c1f9d53f79adafd5947
|
7
|
+
data.tar.gz: 1a127bf11d514789f6ec808f964d47e9d459687a5b2d91ebe468d6a59a28c5f9dbf01203e1aee583311c776ca9caa41831d74a15557adf5bb0bd71cce27cffdd
|
data/Changes.md
CHANGED
@@ -1,8 +1,246 @@
|
|
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
4
|
|
5
|
-
|
5
|
+
7.3.0
|
6
|
+
----------
|
7
|
+
|
8
|
+
- **NEW FEATURE** Add `Sidekiq::IterableJob`, iteration support for long-running jobs. [#6286, fatkodima]
|
9
|
+
Iterable jobs are interruptible and can restart quickly if
|
10
|
+
running during a deploy. You must ensure that `each_iteration`
|
11
|
+
doesn't take more than Sidekiq's `-t` timeout (default: 25 seconds). Iterable jobs must not implement `perform`.
|
12
|
+
```ruby
|
13
|
+
class ProcessArrayJob
|
14
|
+
include Sidekiq::IterableJob
|
15
|
+
def build_enumerator(*args, **kwargs)
|
16
|
+
array_enumerator(args, **kwargs)
|
17
|
+
end
|
18
|
+
def each_iteration(arg)
|
19
|
+
puts arg
|
20
|
+
end
|
21
|
+
end
|
22
|
+
ProcessArrayJob.perform_async(1, 2, 3)
|
23
|
+
```
|
24
|
+
See the [Iteration](//github.com/sidekiq/sidekiq/wiki/Iteration) wiki page and the RDoc in `Sidekiq::IterableJob`.
|
25
|
+
This feature should be considered BETA until the next minor release.
|
26
|
+
- **SECURITY** The Web UI no longer allows extensions to use `<script>`.
|
27
|
+
Adjust CSP to disallow inline scripts within the Web UI. Please see
|
28
|
+
`examples/webui-ext` for how to register Web UI extensions and use
|
29
|
+
dynamic CSS and JS. This will make Sidekiq immune to XSS attacks. [#6270]
|
30
|
+
- Add config option, `:skip_default_job_logging` to disable Sidekiq's default
|
31
|
+
start/finish job logging. [#6200]
|
32
|
+
- Allow `Sidekiq::Limiter.redis` to use Redis Cluster [#6288]
|
33
|
+
- Retain CurrentAttributeѕ after inline execution [#6307]
|
34
|
+
- Ignore non-existent CurrentAttributes attributes when restoring [#6341]
|
35
|
+
- Raise default Redis {read,write,connect} timeouts from 1 to 3 seconds
|
36
|
+
to minimize ReadTimeoutErrors [#6162]
|
37
|
+
- Add `logger` as a dependency since it will become bundled in Ruby 3.5 [#6320]
|
38
|
+
- Ignore unsupported locales in the Web UI [#6313]
|
39
|
+
|
40
|
+
7.2.4
|
41
|
+
----------
|
42
|
+
|
43
|
+
- Fix XSS in metrics filtering introduced in 7.2.0, CVE-2024-32887
|
44
|
+
Thanks to @UmerAdeemCheema for the security report.
|
45
|
+
|
46
|
+
7.2.3
|
47
|
+
----------
|
48
|
+
|
49
|
+
- [Support Dragonfly.io](https://www.mikeperham.com/2024/02/01/supporting-dragonfly/) as an alternative Redis implementation
|
50
|
+
- Fix error unpacking some compressed error backtraces [#6241]
|
51
|
+
- Fix potential heartbeat data leak [#6227]
|
52
|
+
- Add ability to find a currently running work by jid [#6212, fatkodima]
|
53
|
+
|
54
|
+
7.2.2
|
55
|
+
----------
|
56
|
+
|
57
|
+
- Add `Process.warmup` call in Ruby 3.3+
|
58
|
+
- Batch jobs now skip transactional push [#6160]
|
59
|
+
|
60
|
+
7.2.1
|
61
|
+
----------
|
62
|
+
|
63
|
+
- Add `Sidekiq::Work` type which replaces the raw Hash as the third parameter in
|
64
|
+
`Sidekiq::WorkSet#each { |pid, tid, hash| ... }` [#6145]
|
65
|
+
- **DEPRECATED**: direct access to the attributes within the `hash` block parameter above.
|
66
|
+
The `Sidekiq::Work` instance contains accessor methods to get at the same data, e.g.
|
67
|
+
```ruby
|
68
|
+
work["queue"] # Old
|
69
|
+
work.queue # New
|
70
|
+
```
|
71
|
+
- Fix Ruby 3.3 warnings around `base64` gem [#6151, earlopain]
|
72
|
+
|
73
|
+
7.2.0
|
74
|
+
----------
|
75
|
+
|
76
|
+
- `sidekiq_retries_exhausted` can return `:discard` to avoid the deadset
|
77
|
+
and all death handlers [#6091]
|
78
|
+
- Metrics filtering by job class in Web UI [#5974]
|
79
|
+
- Better readability and formatting for numbers within the Web UI [#6080]
|
80
|
+
- Add explicit error if user code tries to nest test modes [#6078]
|
81
|
+
```ruby
|
82
|
+
Sidekiq::Testing.inline! # global setting
|
83
|
+
Sidekiq::Testing.fake! do # override within block
|
84
|
+
# ok
|
85
|
+
Sidekiq::Testing.inline! do # can't override the override
|
86
|
+
# not ok, nested
|
87
|
+
end
|
88
|
+
end
|
89
|
+
```
|
90
|
+
- **SECURITY** Forbid inline JavaScript execution in Web UI [#6074]
|
91
|
+
- Adjust redis-client adapter to avoid `method_missing` [#6083]
|
92
|
+
This can result in app code breaking if your app's Redis API usage was
|
93
|
+
depending on Sidekiq's adapter to correct invalid redis-client API usage.
|
94
|
+
One example:
|
95
|
+
```ruby
|
96
|
+
# bad, not redis-client native
|
97
|
+
# Unsupported command argument type: TrueClass (TypeError)
|
98
|
+
Sidekiq.redis { |c| c.set("key", "value", nx: true, ex: 15) }
|
99
|
+
# good
|
100
|
+
Sidekiq.redis { |c| c.set("key", "value", "nx", "ex", 15) }
|
101
|
+
```
|
102
|
+
|
103
|
+
7.1.6
|
104
|
+
----------
|
105
|
+
|
106
|
+
- The block forms of testing modes (inline, fake) are now thread-safe so you can have
|
107
|
+
a multithreaded test suite which uses different modes for different tests. [#6069]
|
108
|
+
- Fix breakage with non-Proc error handlers [#6065]
|
109
|
+
|
110
|
+
7.1.5
|
111
|
+
----------
|
112
|
+
|
113
|
+
- **FEATURE**: Job filtering within the Web UI. This feature has been open
|
114
|
+
sourced from Sidekiq Pro. [#6052]
|
115
|
+
- **API CHANGE** Error handlers now take three arguments `->(ex, context, config)`.
|
116
|
+
The previous calling convention will work until Sidekiq 8.0 but will print
|
117
|
+
out a deprecation warning. [#6051]
|
118
|
+
- Fix issue with the `batch_size` and `at` options in `S::Client.push_bulk` [#6040]
|
119
|
+
- Fix inline testing firing batch callbacks early [#6057]
|
120
|
+
- Use new log broadcast API in Rails 7.1 [#6054]
|
121
|
+
- Crash if user tries to use RESP2 `protocol: 2` [#6061]
|
122
|
+
|
123
|
+
7.1.4
|
124
|
+
----------
|
125
|
+
|
126
|
+
- Fix empty `retry_for` logic [#6035]
|
127
|
+
|
128
|
+
7.1.3
|
129
|
+
----------
|
130
|
+
|
131
|
+
- Add `sidekiq_options retry_for: 48.hours` to allow time-based retry windows [#6029]
|
132
|
+
- Support sidekiq_retry_in and sidekiq_retries_exhausted_block in ActiveJobs (#5994)
|
133
|
+
- Lowercase all Rack headers for Rack 3.0 [#5951]
|
134
|
+
- Validate Sidekiq::Web page refresh delay to avoid potential DoS,
|
135
|
+
CVE-2023-26141, thanks for reporting Keegan!
|
136
|
+
|
137
|
+
7.1.2
|
138
|
+
----------
|
139
|
+
|
140
|
+
- Mark Web UI assets as private so CDNs won't cache them [#5936]
|
141
|
+
- Fix stackoverflow when using Oj and the JSON log formatter [#5920]
|
142
|
+
- Remove spurious `enqueued_at` from scheduled ActiveJobs [#5937]
|
143
|
+
|
144
|
+
7.1.1
|
145
|
+
----------
|
146
|
+
|
147
|
+
- Support multiple CurrentAttributes [#5904]
|
148
|
+
- Speed up latency fetch with large queues on Redis <7 [#5910]
|
149
|
+
- Allow a larger default client pool [#5886]
|
150
|
+
- Ensure Sidekiq.options[:environment] == RAILS_ENV [#5932]
|
151
|
+
|
152
|
+
7.1.0
|
153
|
+
----------
|
154
|
+
|
155
|
+
- Improve display of ActiveJob arguments in Web UI [#5825, cover]
|
156
|
+
- Update `push_bulk` to push `batch_size` jobs at a time and allow laziness [#5827, fatkodima]
|
157
|
+
This allows Sidekiq::Client to push unlimited jobs as long as it has enough memory for the batch_size.
|
158
|
+
- Update `perform_bulk` to use `push_bulk` internally.
|
159
|
+
- Change return value of `push_bulk` to map 1-to-1 with arguments.
|
160
|
+
If you call `push_bulk(args: [[1], [2], [3]])`, you will now always get
|
161
|
+
an array of 3 values as the result: `["jid1", nil, "jid3"]` where nil means
|
162
|
+
that particular job did not push successfully (possibly due to middleware
|
163
|
+
stopping it). Previously nil values were removed so it was impossible to tell
|
164
|
+
which jobs pushed successfully and which did not.
|
165
|
+
- Migrate away from all deprecated Redis commands [#5788]
|
166
|
+
Sidekiq will now print a warning if you use one of those deprecated commands.
|
167
|
+
- Prefix all Sidekiq thread names [#5872]
|
168
|
+
|
169
|
+
7.0.9
|
170
|
+
----------
|
171
|
+
|
172
|
+
- Restore confirmation dialogs in Web UI [#5881, shevaun]
|
173
|
+
- Increase fetch timeout to minimize ReadTimeoutError [#5874]
|
174
|
+
- Reverse histogram tooltip ordering [#5868]
|
175
|
+
- Add Scottish Gaelic (gd) locale [#5867, GunChleoc]
|
176
|
+
|
177
|
+
7.0.8
|
178
|
+
----------
|
179
|
+
|
180
|
+
- **SECURITY** Sanitize `period` input parameter on Metrics pages.
|
181
|
+
Specially crafted values can lead to XSS. This functionality
|
182
|
+
was introduced in 7.0.4. Thank you to spercex @ huntr.dev [#5694]
|
183
|
+
- Add job hash as 3rd parameter to the `sidekiq_retry_in` block.
|
184
|
+
|
185
|
+
7.0.7
|
186
|
+
----------
|
187
|
+
|
188
|
+
- Fix redis-client API usage which could result in stuck Redis
|
189
|
+
connections [#5823]
|
190
|
+
- Fix AS::Duration with `sidekiq_retry_in` [#5806]
|
191
|
+
- Restore dumping config options on startup with `-v` [#5822]
|
192
|
+
|
193
|
+
7.0.5,7.0.6
|
194
|
+
----------
|
195
|
+
|
196
|
+
- More context for debugging json unsafe errors [#5787]
|
197
|
+
|
198
|
+
7.0.4
|
199
|
+
----------
|
200
|
+
|
201
|
+
- Performance and memory optimizations [#5768, fatkodima]
|
202
|
+
- Add 1-8 hour period selector to Metrics pages [#5694]
|
203
|
+
- Fix process display with `sidekiqmon` [#5733]
|
204
|
+
|
205
|
+
7.0.3
|
206
|
+
----------
|
207
|
+
|
208
|
+
- Don't warn about memory policy on Redis Enterprise [#5712]
|
209
|
+
- Don't allow Quiet/Stop on embedded Sidekiq instances [#5716]
|
210
|
+
- Fix `size: X` for configuring the default Redis pool size [#5702]
|
211
|
+
- Improve the display of queue weights on Busy page [#5642]
|
212
|
+
- Freeze CurrentAttributes on a job once initially set [#5692]
|
213
|
+
|
214
|
+
7.0.2
|
215
|
+
----------
|
216
|
+
|
217
|
+
- Improve compatibility with custom loggers [#5673]
|
218
|
+
- Add queue weights on Busy page [#5640]
|
219
|
+
- Add BID link on job_info page if job is part of a Batch [#5623]
|
220
|
+
- Allow custom extensions to add rows/links within Job detail pages [#5624]
|
221
|
+
```ruby
|
222
|
+
Sidekiq::Web.custom_job_info_rows << AddAccountLink.new
|
223
|
+
|
224
|
+
class AddAccountLink
|
225
|
+
include CGI::Util
|
226
|
+
def add_pair(job)
|
227
|
+
# yield a (name, value) pair
|
228
|
+
# You can include HTML tags and CSS, Sidekiq does not do any
|
229
|
+
# escaping so beware user data injection! Note how we use CGI's
|
230
|
+
# `h` escape helper.
|
231
|
+
aid = job["account_id"]
|
232
|
+
yield "Account", "<a href='/accounts/#{h aid}'>#{h aid}</a>" if aid
|
233
|
+
end
|
234
|
+
end
|
235
|
+
```
|
236
|
+
|
237
|
+
7.0.1
|
238
|
+
----------
|
239
|
+
|
240
|
+
- Allow an embedding process to reuse its own heartbeat thread
|
241
|
+
- Update zh-cn localization
|
242
|
+
|
243
|
+
7.0.0
|
6
244
|
----------
|
7
245
|
|
8
246
|
- Embedded mode!
|
@@ -10,13 +248,23 @@ main
|
|
10
248
|
- Job Execution metrics!!!
|
11
249
|
- See `docs/7.0-Upgrade.md` for release notes
|
12
250
|
|
13
|
-
6
|
251
|
+
6.5.{10,11,12}
|
252
|
+
----------
|
253
|
+
|
254
|
+
- Fixes for Rails 7.1 [#6067, #6070]
|
255
|
+
|
256
|
+
6.5.9
|
257
|
+
----------
|
258
|
+
|
259
|
+
- Ensure Sidekiq.options[:environment] == RAILS_ENV [#5932]
|
260
|
+
|
261
|
+
6.5.8
|
14
262
|
----------
|
15
263
|
|
264
|
+
- Fail if using a bad version of scout_apm [#5616]
|
16
265
|
- Add pagination to Busy page [#5556]
|
17
266
|
- Speed up WorkSet#each [#5559]
|
18
|
-
- Adjust CurrentAttributes to work with the String class name so we aren't referencing
|
19
|
-
the Class within a Rails initializer [#5536]
|
267
|
+
- Adjust CurrentAttributes to work with the String class name so we aren't referencing the Class within a Rails initializer [#5536]
|
20
268
|
|
21
269
|
6.5.7
|
22
270
|
----------
|
@@ -50,7 +298,7 @@ the Class within a Rails initializer [#5536]
|
|
50
298
|
6.5.2
|
51
299
|
----------
|
52
300
|
|
53
|
-
- [Job Metrics are under active development, help wanted!](https://github.com/
|
301
|
+
- [Job Metrics are under active development, help wanted!](https://github.com/sidekiq/sidekiq/wiki/Metrics#contributing) **BETA**
|
54
302
|
- Add `Context` column on queue page which shows any CurrentAttributes [#5450]
|
55
303
|
- `sidekiq_retry_in` may now return `:discard` or `:kill` to dynamically stop job retries [#5406]
|
56
304
|
- Smarter sorting of processes in /busy Web UI [#5398]
|
@@ -69,7 +317,7 @@ the Class within a Rails initializer [#5536]
|
|
69
317
|
- Substantial refactoring of Sidekiq server internals, part of a larger effort
|
70
318
|
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).
|
71
319
|
- **Add beta support for the `redis-client` gem**. This will become the default Redis driver in Sidekiq 7.0. [#5298]
|
72
|
-
Read more: https://github.com/
|
320
|
+
Read more: https://github.com/sidekiq/sidekiq/wiki/Using-redis-client
|
73
321
|
- **Add beta support for DB transaction-aware client** [#5291]
|
74
322
|
Add this line to your initializer and any jobs created during a transaction
|
75
323
|
will only be pushed to Redis **after the transaction commits**. You will need to add the
|
@@ -269,7 +517,7 @@ If this is a Rails app in API mode, you need to enable sessions.
|
|
269
517
|
---------
|
270
518
|
|
271
519
|
- **Integrate with systemd's watchdog and notification features** [#4488]
|
272
|
-
Set `Type=notify` in [sidekiq.service](https://github.com/
|
520
|
+
Set `Type=notify` in [sidekiq.service](https://github.com/sidekiq/sidekiq/blob/4b8a8bd3ae42f6e48ae1fdaf95ed7d7af18ed8bb/examples/systemd/sidekiq.service#L30-L39). The integration works automatically.
|
273
521
|
- Use `setTimeout` rather than `setInterval` to avoid thundering herd [#4480]
|
274
522
|
- Fix edge case where a job can be pushed without a queue.
|
275
523
|
- Flush job stats at exit [#4498]
|
@@ -282,7 +530,7 @@ If this is a Rails app in API mode, you need to enable sessions.
|
|
282
530
|
- Fix broken Web UI response when using NewRelic and Rack 2.1.2+. [#4440]
|
283
531
|
- Update APIs to use `UNLINK`, not `DEL`. [#4449]
|
284
532
|
- Fix Ruby 2.7 warnings [#4412]
|
285
|
-
- Add support for `APP_ENV` [[95fa5d9]](https://github.com/
|
533
|
+
- Add support for `APP_ENV` [[95fa5d9]](https://github.com/sidekiq/sidekiq/commit/95fa5d90192148026e52ca2902f1b83c70858ce8)
|
286
534
|
|
287
535
|
6.0.4
|
288
536
|
---------
|
@@ -394,7 +642,7 @@ Sidekiq.configure_server do |config|
|
|
394
642
|
config.log_formatter = Sidekiq::Logger::Formatters::JSON.new
|
395
643
|
end
|
396
644
|
```
|
397
|
-
See the [Logging wiki page](https://github.com/
|
645
|
+
See the [Logging wiki page](https://github.com/sidekiq/sidekiq/wiki/Logging) for more details.
|
398
646
|
- **BREAKING CHANGE** Validate proper usage of the `REDIS_PROVIDER`
|
399
647
|
variable. This variable is meant to hold the name of the environment
|
400
648
|
variable which contains your Redis URL, so that you can switch Redis
|
@@ -841,7 +1089,7 @@ Sidekiq::Queues.clear_all
|
|
841
1089
|
- **FIX MEMORY LEAK** Under rare conditions, threads may leak [#2598, gazay]
|
842
1090
|
- Add Ukrainian locale [#2561, elrakita]
|
843
1091
|
- Disconnect and retry Redis operations if we see a READONLY error [#2550]
|
844
|
-
- Add server middleware testing harness; see [wiki](https://github.com/
|
1092
|
+
- Add server middleware testing harness; see [wiki](https://github.com/sidekiq/sidekiq/wiki/Testing#testing-server-middleware) [#2534, ryansch]
|
845
1093
|
|
846
1094
|
3.5.0
|
847
1095
|
-----------
|
@@ -859,7 +1107,7 @@ Sidekiq::Queues.clear_all
|
|
859
1107
|
- Fix CSRF vulnerability in Web UI, thanks to Egor Homakov for
|
860
1108
|
reporting. [#2422] If you are running the Web UI as a standalone Rack app,
|
861
1109
|
ensure you have a [session middleware
|
862
|
-
configured](https://github.com/
|
1110
|
+
configured](https://github.com/sidekiq/sidekiq/wiki/Monitoring#standalone):
|
863
1111
|
```ruby
|
864
1112
|
use Rack::Session::Cookie, :secret => "some unique secret string here"
|
865
1113
|
```
|
@@ -1243,7 +1491,7 @@ middleware, see docs/3.0-Upgrade.md.**
|
|
1243
1491
|
appear to be doing any work. [#1194]
|
1244
1492
|
- Sidekiq's testing behavior is now dynamic. You can choose between
|
1245
1493
|
`inline` and `fake` behavior in your tests. See
|
1246
|
-
[Testing](https://github.com/
|
1494
|
+
[Testing](https://github.com/sidekiq/sidekiq/wiki/Testing) for detail. [#1193]
|
1247
1495
|
- The Retries table has a new column for the error message.
|
1248
1496
|
- The Web UI topbar now contains the status and live poll button.
|
1249
1497
|
- Orphaned worker records are now auto-vacuumed when you visit the
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@ Sidekiq
|
|
2
2
|
==============
|
3
3
|
|
4
4
|
[](https://rubygems.org/gems/sidekiq)
|
5
|
-

|
6
6
|
|
7
7
|
Simple, efficient background processing for Ruby.
|
8
8
|
|
@@ -10,28 +10,15 @@ Sidekiq uses threads to handle many jobs at the same time in the
|
|
10
10
|
same process. It does not require Rails but will integrate tightly with
|
11
11
|
Rails to make background processing dead simple.
|
12
12
|
|
13
|
-
Performance
|
14
|
-
---------------
|
15
|
-
|
16
|
-
Version | Latency | Garbage created for 10k jobs | Time to process 100k jobs | Throughput | Ruby
|
17
|
-
-----------------|------|---------|---------|------------------------|-----
|
18
|
-
Sidekiq 6.0.2 | 3 ms | 156 MB | 14.0 sec| **7100 jobs/sec** | MRI 2.6.3
|
19
|
-
Sidekiq 6.0.0 | 3 ms | 156 MB | 19 sec | 5200 jobs/sec | MRI 2.6.3
|
20
|
-
Sidekiq 4.0.0 | 10 ms | 151 MB | 22 sec | 4500 jobs/sec |
|
21
|
-
Sidekiq 3.5.1 | 22 ms | 1257 MB | 125 sec | 800 jobs/sec |
|
22
|
-
Resque 1.25.2 | - | - | 420 sec | 240 jobs/sec |
|
23
|
-
DelayedJob 4.1.1 | - | - | 465 sec | 215 jobs/sec |
|
24
|
-
|
25
|
-
This benchmark can be found in `bin/sidekiqload` and assumes a Redis network latency of 1ms.
|
26
13
|
|
27
14
|
Requirements
|
28
15
|
-----------------
|
29
16
|
|
30
|
-
- Redis: 6.2+
|
17
|
+
- Redis: Redis 6.2+ or Dragonfly 1.13+
|
31
18
|
- Ruby: MRI 2.7+ or JRuby 9.3+.
|
32
19
|
|
33
20
|
Sidekiq 7.0 supports Rails 6.0+ but does not require it.
|
34
|
-
|
21
|
+
As of 7.2, Sidekiq supports Dragonfly as an alternative to Redis for data storage.
|
35
22
|
|
36
23
|
Installation
|
37
24
|
-----------------
|
@@ -42,12 +29,32 @@ Installation
|
|
42
29
|
Getting Started
|
43
30
|
-----------------
|
44
31
|
|
45
|
-
See the [Getting Started wiki page](https://github.com/
|
32
|
+
See the [Getting Started wiki page](https://github.com/sidekiq/sidekiq/wiki/Getting-Started) and follow the simple setup process.
|
46
33
|
You can watch [this YouTube playlist](https://www.youtube.com/playlist?list=PLjeHh2LSCFrWGT5uVjUuFKAcrcj5kSai1) to learn all about
|
47
34
|
Sidekiq and see its features in action. Here's the Web UI:
|
48
35
|
|
49
|
-

|
37
|
+
|
38
|
+
Performance
|
39
|
+
---------------
|
40
|
+
|
41
|
+
The benchmark in `bin/sidekiqload` creates 500,000 no-op jobs and drains them as fast as possible, assuming a fixed Redis network latency of 1ms.
|
42
|
+
This requires a lot of Redis network I/O and JSON parsing.
|
43
|
+
This benchmark is IO-bound so we increase the concurrency to 25.
|
44
|
+
If your application is sending lots of emails or performing other network-intensive work, you could see a similar benefit but be careful not to saturate the CPU.
|
45
|
+
|
46
|
+
Version | Time to process 500k jobs | Throughput (jobs/sec) | Ruby | Concurrency | Job Type
|
47
|
+
-----------------|------|---------|---------|------------------------|---
|
48
|
+
Sidekiq 7.0.3 | 21.3 sec| 23,500 | 3.2.0+yjit | 30 | Sidekiq::Job
|
49
|
+
Sidekiq 7.0.3 | 33.8 sec| 14,700 | 3.2.0+yjit | 30 | ActiveJob 7.0.4
|
50
|
+
Sidekiq 7.0.3 | 23.5 sec| 21,300 | 3.2.0 | 30 | Sidekiq::Job
|
51
|
+
Sidekiq 7.0.3 | 46.5 sec| 10,700 | 3.2.0 | 30 | ActiveJob 7.0.4
|
52
|
+
Sidekiq 7.0.3 | 23.0 sec| 21,700 | 2.7.5 | 30 | Sidekiq::Job
|
53
|
+
Sidekiq 7.0.3 | 46.5 sec| 10,850 | 2.7.5 | 30 | ActiveJob 7.0.4
|
50
54
|
|
55
|
+
Most of Sidekiq's overhead is Redis network I/O.
|
56
|
+
ActiveJob adds a notable amount of CPU overhead due to argument deserialization and callbacks.
|
57
|
+
Concurrency of 30 was determined experimentally to maximize one CPU without saturating it.
|
51
58
|
|
52
59
|
Want to Upgrade?
|
53
60
|
-------------------
|
@@ -67,33 +74,33 @@ Problems?
|
|
67
74
|
**Please do not directly email any Sidekiq committers with questions or problems.**
|
68
75
|
A community is best served when discussions are held in public.
|
69
76
|
|
70
|
-
If you have a problem, please review the [FAQ](https://github.com/
|
71
|
-
Searching the [issues](https://github.com/
|
77
|
+
If you have a problem, please review the [FAQ](https://github.com/sidekiq/sidekiq/wiki/FAQ) and [Troubleshooting](https://github.com/sidekiq/sidekiq/wiki/Problems-and-Troubleshooting) wiki pages.
|
78
|
+
Searching the [issues](https://github.com/sidekiq/sidekiq/issues) for your problem is also a good idea.
|
72
79
|
|
73
80
|
Sidekiq Pro and Sidekiq Enterprise customers get private email support.
|
74
81
|
You can purchase at https://sidekiq.org; email support@contribsys.com for help.
|
75
82
|
|
76
83
|
Useful resources:
|
77
84
|
|
78
|
-
* Product documentation is in the [wiki](https://github.com/
|
79
|
-
* Occasional announcements are made to the [@sidekiq](https://
|
85
|
+
* Product documentation is in the [wiki](https://github.com/sidekiq/sidekiq/wiki).
|
86
|
+
* Occasional announcements are made to the [@sidekiq](https://ruby.social/@sidekiq) Mastodon account.
|
80
87
|
* The [Sidekiq tag](https://stackoverflow.com/questions/tagged/sidekiq) on Stack Overflow has lots of useful Q & A.
|
81
88
|
|
82
|
-
Every
|
89
|
+
Every Thursday morning is Sidekiq office hour: I video chat and answer questions.
|
83
90
|
See the [Sidekiq support page](https://sidekiq.org/support.html) for details.
|
84
91
|
|
85
92
|
Contributing
|
86
93
|
-----------------
|
87
94
|
|
88
|
-
Please see [the contributing guidelines](https://github.com/
|
95
|
+
Please see [the contributing guidelines](https://github.com/sidekiq/sidekiq/blob/main/.github/contributing.md).
|
89
96
|
|
90
97
|
License
|
91
98
|
-----------------
|
92
99
|
|
93
|
-
Please see [LICENSE.txt](https://github.com/
|
94
|
-
The license for Sidekiq Pro and Sidekiq Enterprise can be found in [COMM-LICENSE.txt](https://github.com/
|
100
|
+
Please see [LICENSE.txt](https://github.com/sidekiq/sidekiq/blob/main/LICENSE.txt) for licensing details.
|
101
|
+
The license for Sidekiq Pro and Sidekiq Enterprise can be found in [COMM-LICENSE.txt](https://github.com/sidekiq/sidekiq/blob/main/COMM-LICENSE.txt).
|
95
102
|
|
96
103
|
Author
|
97
104
|
-----------------
|
98
105
|
|
99
|
-
Mike Perham, [@getajobmike](https://
|
106
|
+
Mike Perham, [@getajobmike](https://ruby.social/@getajobmike) / [@sidekiq](https://ruby.social/@sidekiq), [https://www.mikeperham.com](https://www.mikeperham.com) / [https://www.contribsys.com](https://www.contribsys.com)
|