sidekiq 6.5.5 → 7.2.0
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 +4 -4
- data/Changes.md +221 -13
- data/README.md +42 -34
- data/bin/sidekiq +3 -8
- data/bin/sidekiqload +204 -118
- data/bin/sidekiqmon +3 -0
- data/lib/sidekiq/api.rb +140 -134
- data/lib/sidekiq/capsule.rb +127 -0
- data/lib/sidekiq/cli.rb +57 -63
- data/lib/sidekiq/client.rb +68 -39
- data/lib/sidekiq/component.rb +4 -1
- data/lib/sidekiq/config.rb +287 -0
- data/lib/sidekiq/deploy.rb +62 -0
- data/lib/sidekiq/embedded.rb +61 -0
- data/lib/sidekiq/fetch.rb +11 -14
- data/lib/sidekiq/job.rb +371 -10
- data/lib/sidekiq/job_logger.rb +2 -2
- data/lib/sidekiq/job_retry.rb +35 -16
- data/lib/sidekiq/job_util.rb +51 -15
- data/lib/sidekiq/launcher.rb +68 -64
- data/lib/sidekiq/logger.rb +1 -26
- data/lib/sidekiq/manager.rb +9 -11
- data/lib/sidekiq/metrics/query.rb +7 -5
- data/lib/sidekiq/metrics/shared.rb +8 -7
- data/lib/sidekiq/metrics/tracking.rb +20 -18
- data/lib/sidekiq/middleware/chain.rb +19 -18
- data/lib/sidekiq/middleware/current_attributes.rb +53 -21
- data/lib/sidekiq/monitor.rb +17 -4
- data/lib/sidekiq/paginator.rb +11 -3
- data/lib/sidekiq/processor.rb +46 -51
- data/lib/sidekiq/rails.rb +16 -16
- data/lib/sidekiq/redis_client_adapter.rb +23 -66
- data/lib/sidekiq/redis_connection.rb +12 -113
- data/lib/sidekiq/scheduled.rb +60 -27
- data/lib/sidekiq/testing.rb +30 -39
- data/lib/sidekiq/transaction_aware_client.rb +4 -5
- data/lib/sidekiq/version.rb +2 -1
- data/lib/sidekiq/web/action.rb +3 -3
- data/lib/sidekiq/web/application.rb +96 -12
- data/lib/sidekiq/web/csrf_protection.rb +2 -2
- data/lib/sidekiq/web/helpers.rb +54 -55
- data/lib/sidekiq/web.rb +17 -16
- data/lib/sidekiq/worker_compatibility_alias.rb +13 -0
- data/lib/sidekiq.rb +76 -274
- data/sidekiq.gemspec +12 -10
- data/web/assets/javascripts/application.js +34 -0
- data/web/assets/javascripts/base-charts.js +106 -0
- data/web/assets/javascripts/dashboard-charts.js +182 -0
- data/web/assets/javascripts/dashboard.js +10 -232
- data/web/assets/javascripts/metrics.js +151 -115
- data/web/assets/stylesheets/application-dark.css +4 -0
- data/web/assets/stylesheets/application-rtl.css +2 -91
- data/web/assets/stylesheets/application.css +32 -298
- data/web/locales/ar.yml +70 -70
- data/web/locales/cs.yml +62 -62
- data/web/locales/da.yml +60 -53
- data/web/locales/de.yml +65 -65
- data/web/locales/el.yml +2 -7
- data/web/locales/en.yml +78 -70
- data/web/locales/es.yml +68 -68
- data/web/locales/fa.yml +65 -65
- data/web/locales/fr.yml +81 -67
- 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 +73 -68
- data/web/locales/ko.yml +52 -52
- data/web/locales/lt.yml +66 -66
- 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 +79 -69
- data/web/locales/pt.yml +51 -51
- data/web/locales/ru.yml +67 -66
- 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 +67 -67
- data/web/locales/zh-cn.yml +43 -16
- data/web/locales/zh-tw.yml +42 -8
- data/web/views/_footer.erb +5 -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 +45 -29
- data/web/views/dashboard.erb +26 -5
- data/web/views/filtering.erb +7 -0
- data/web/views/metrics.erb +46 -24
- data/web/views/metrics_for_job.erb +41 -69
- 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 +44 -27
- data/lib/sidekiq/delay.rb +0 -43
- data/lib/sidekiq/extensions/action_mailer.rb +0 -48
- data/lib/sidekiq/extensions/active_record.rb +0 -43
- data/lib/sidekiq/extensions/class_methods.rb +0 -43
- data/lib/sidekiq/extensions/generic_proxy.rb +0 -33
- data/lib/sidekiq/metrics/deploy.rb +0 -47
- data/lib/sidekiq/worker.rb +0 -367
- data/web/assets/javascripts/graph.js +0 -16
- /data/{LICENSE → LICENSE.txt} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30f824346db9b0ebf8ee13c6ac0101494e5fd6d05b4ed2ef3ad97c5b17ccbc10
|
4
|
+
data.tar.gz: bed22f02925116256550bbc34ef9decd70bdbca356d5d61abedd4d14a7dcac45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 347e82cf6f215a1e4bd09c3f12d382be79d96bb83ccd1d09f928db19b936c2dd72c0f2e3a8988160086da7928a7911d84eddd005428c7b6a337763c4b60a3492
|
7
|
+
data.tar.gz: ef0a03f45d4d35e832f36b7a09ae0694838cd0cf3582dc20d53956bb5a61ba07811d410600b43a9bdf777e68dd2549910a125d23885afca8388b8513bb7ac8d1
|
data/Changes.md
CHANGED
@@ -1,6 +1,214 @@
|
|
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.2.0
|
6
|
+
----------
|
7
|
+
|
8
|
+
- `sidekiq_retries_exhausted` can return `:discard` to avoid the deadset
|
9
|
+
and all death handlers [#6091]
|
10
|
+
- Metrics filtering by job class in Web UI [#5974]
|
11
|
+
- Better readability and formatting for numbers within the Web UI [#6080]
|
12
|
+
- Add explicit error if user code tries to nest test modes [#6078]
|
13
|
+
```ruby
|
14
|
+
Sidekiq::Testing.inline! # global setting
|
15
|
+
Sidekiq::Testing.fake! do # override within block
|
16
|
+
# ok
|
17
|
+
Sidekiq::Testing.inline! do # can't override the override
|
18
|
+
# not ok, nested
|
19
|
+
end
|
20
|
+
end
|
21
|
+
```
|
22
|
+
- **SECURITY** Forbid inline JavaScript execution in Web UI [#6074]
|
23
|
+
- Adjust redis-client adapter to avoid `method_missing` [#6083]
|
24
|
+
This can result in app code breaking if your app's Redis API usage was
|
25
|
+
depending on Sidekiq's adapter to correct invalid redis-client API usage.
|
26
|
+
One example:
|
27
|
+
```ruby
|
28
|
+
# bad, not redis-client native
|
29
|
+
# Unsupported command argument type: TrueClass (TypeError)
|
30
|
+
Sidekiq.redis { |c| c.set("key", "value", nx: true, ex: 15) }
|
31
|
+
# good
|
32
|
+
Sidekiq.redis { |c| c.set("key", "value", "nx", "ex", 15) }
|
33
|
+
```
|
34
|
+
|
35
|
+
7.1.6
|
36
|
+
----------
|
37
|
+
|
38
|
+
- The block forms of testing modes (inline, fake) are now thread-safe so you can have
|
39
|
+
a multithreaded test suite which uses different modes for different tests. [#6069]
|
40
|
+
- Fix breakage with non-Proc error handlers [#6065]
|
41
|
+
|
42
|
+
7.1.5
|
43
|
+
----------
|
44
|
+
|
45
|
+
- **FEATURE**: Job filtering within the Web UI. This feature has been open
|
46
|
+
sourced from Sidekiq Pro. [#6052]
|
47
|
+
- **API CHANGE** Error handlers now take three arguments `->(ex, context, config)`.
|
48
|
+
The previous calling convention will work until Sidekiq 8.0 but will print
|
49
|
+
out a deprecation warning. [#6051]
|
50
|
+
- Fix issue with the `batch_size` and `at` options in `S::Client.push_bulk` [#6040]
|
51
|
+
- Fix inline testing firing batch callbacks early [#6057]
|
52
|
+
- Use new log broadcast API in Rails 7.1 [#6054]
|
53
|
+
- Crash if user tries to use RESP2 `protocol: 2` [#6061]
|
54
|
+
|
55
|
+
7.1.4
|
56
|
+
----------
|
57
|
+
|
58
|
+
- Fix empty `retry_for` logic [#6035]
|
59
|
+
|
60
|
+
7.1.3
|
61
|
+
----------
|
62
|
+
|
63
|
+
- Add `sidekiq_options retry_for: 48.hours` to allow time-based retry windows [#6029]
|
64
|
+
- Support sidekiq_retry_in and sidekiq_retries_exhausted_block in ActiveJobs (#5994)
|
65
|
+
- Lowercase all Rack headers for Rack 3.0 [#5951]
|
66
|
+
- Validate Sidekiq::Web page refresh delay to avoid potential DoS,
|
67
|
+
CVE-2023-26141, thanks for reporting Keegan!
|
68
|
+
|
69
|
+
7.1.2
|
70
|
+
----------
|
71
|
+
|
72
|
+
- Mark Web UI assets as private so CDNs won't cache them [#5936]
|
73
|
+
- Fix stackoverflow when using Oj and the JSON log formatter [#5920]
|
74
|
+
- Remove spurious `enqueued_at` from scheduled ActiveJobs [#5937]
|
75
|
+
|
76
|
+
7.1.1
|
77
|
+
----------
|
78
|
+
|
79
|
+
- Support multiple CurrentAttributes [#5904]
|
80
|
+
- Speed up latency fetch with large queues on Redis <7 [#5910]
|
81
|
+
- Allow a larger default client pool [#5886]
|
82
|
+
- Ensure Sidekiq.options[:environment] == RAILS_ENV [#5932]
|
83
|
+
|
84
|
+
7.1.0
|
85
|
+
----------
|
86
|
+
|
87
|
+
- Improve display of ActiveJob arguments in Web UI [#5825, cover]
|
88
|
+
- Update `push_bulk` to push `batch_size` jobs at a time and allow laziness [#5827, fatkodima]
|
89
|
+
This allows Sidekiq::Client to push unlimited jobs as long as it has enough memory for the batch_size.
|
90
|
+
- Update `perform_bulk` to use `push_bulk` internally.
|
91
|
+
- Change return value of `push_bulk` to map 1-to-1 with arguments.
|
92
|
+
If you call `push_bulk(args: [[1], [2], [3]])`, you will now always get
|
93
|
+
an array of 3 values as the result: `["jid1", nil, "jid3"]` where nil means
|
94
|
+
that particular job did not push successfully (possibly due to middleware
|
95
|
+
stopping it). Previously nil values were removed so it was impossible to tell
|
96
|
+
which jobs pushed successfully and which did not.
|
97
|
+
- Migrate away from all deprecated Redis commands [#5788]
|
98
|
+
Sidekiq will now print a warning if you use one of those deprecated commands.
|
99
|
+
- Prefix all Sidekiq thread names [#5872]
|
100
|
+
|
101
|
+
7.0.9
|
102
|
+
----------
|
103
|
+
|
104
|
+
- Restore confirmation dialogs in Web UI [#5881, shevaun]
|
105
|
+
- Increase fetch timeout to minimize ReadTimeoutError [#5874]
|
106
|
+
- Reverse histogram tooltip ordering [#5868]
|
107
|
+
- Add Scottish Gaelic (gd) locale [#5867, GunChleoc]
|
108
|
+
|
109
|
+
7.0.8
|
110
|
+
----------
|
111
|
+
|
112
|
+
- **SECURITY** Sanitize `period` input parameter on Metrics pages.
|
113
|
+
Specially crafted values can lead to XSS. This functionality
|
114
|
+
was introduced in 7.0.4. Thank you to spercex @ huntr.dev [#5694]
|
115
|
+
- Add job hash as 3rd parameter to the `sidekiq_retry_in` block.
|
116
|
+
|
117
|
+
7.0.7
|
118
|
+
----------
|
119
|
+
|
120
|
+
- Fix redis-client API usage which could result in stuck Redis
|
121
|
+
connections [#5823]
|
122
|
+
- Fix AS::Duration with `sidekiq_retry_in` [#5806]
|
123
|
+
- Restore dumping config options on startup with `-v` [#5822]
|
124
|
+
|
125
|
+
7.0.5,7.0.6
|
126
|
+
----------
|
127
|
+
|
128
|
+
- More context for debugging json unsafe errors [#5787]
|
129
|
+
|
130
|
+
7.0.4
|
131
|
+
----------
|
132
|
+
|
133
|
+
- Performance and memory optimizations [#5768, fatkodima]
|
134
|
+
- Add 1-8 hour period selector to Metrics pages [#5694]
|
135
|
+
- Fix process display with `sidekiqmon` [#5733]
|
136
|
+
|
137
|
+
7.0.3
|
138
|
+
----------
|
139
|
+
|
140
|
+
- Don't warn about memory policy on Redis Enterprise [#5712]
|
141
|
+
- Don't allow Quiet/Stop on embedded Sidekiq instances [#5716]
|
142
|
+
- Fix `size: X` for configuring the default Redis pool size [#5702]
|
143
|
+
- Improve the display of queue weights on Busy page [#5642]
|
144
|
+
- Freeze CurrentAttributes on a job once initially set [#5692]
|
145
|
+
|
146
|
+
7.0.2
|
147
|
+
----------
|
148
|
+
|
149
|
+
- Improve compatibility with custom loggers [#5673]
|
150
|
+
- Add queue weights on Busy page [#5640]
|
151
|
+
- Add BID link on job_info page if job is part of a Batch [#5623]
|
152
|
+
- Allow custom extensions to add rows/links within Job detail pages [#5624]
|
153
|
+
```ruby
|
154
|
+
Sidekiq::Web.custom_job_info_rows << AddAccountLink.new
|
155
|
+
|
156
|
+
class AddAccountLink
|
157
|
+
include CGI::Util
|
158
|
+
def add_pair(job)
|
159
|
+
# yield a (name, value) pair
|
160
|
+
# You can include HTML tags and CSS, Sidekiq does not do any
|
161
|
+
# escaping so beware user data injection! Note how we use CGI's
|
162
|
+
# `h` escape helper.
|
163
|
+
aid = job["account_id"]
|
164
|
+
yield "Account", "<a href='/accounts/#{h aid}'>#{h aid}</a>" if aid
|
165
|
+
end
|
166
|
+
end
|
167
|
+
```
|
168
|
+
|
169
|
+
7.0.1
|
170
|
+
----------
|
171
|
+
|
172
|
+
- Allow an embedding process to reuse its own heartbeat thread
|
173
|
+
- Update zh-cn localization
|
174
|
+
|
175
|
+
7.0.0
|
176
|
+
----------
|
177
|
+
|
178
|
+
- Embedded mode!
|
179
|
+
- Capsules!!
|
180
|
+
- Job Execution metrics!!!
|
181
|
+
- See `docs/7.0-Upgrade.md` for release notes
|
182
|
+
|
183
|
+
6.5.{10,11,12}
|
184
|
+
----------
|
185
|
+
|
186
|
+
- Fixes for Rails 7.1 [#6067, #6070]
|
187
|
+
|
188
|
+
6.5.9
|
189
|
+
----------
|
190
|
+
|
191
|
+
- Ensure Sidekiq.options[:environment] == RAILS_ENV [#5932]
|
192
|
+
|
193
|
+
6.5.8
|
194
|
+
----------
|
195
|
+
|
196
|
+
- Fail if using a bad version of scout_apm [#5616]
|
197
|
+
- Add pagination to Busy page [#5556]
|
198
|
+
- Speed up WorkSet#each [#5559]
|
199
|
+
- Adjust CurrentAttributes to work with the String class name so we aren't referencing the Class within a Rails initializer [#5536]
|
200
|
+
|
201
|
+
6.5.7
|
202
|
+
----------
|
203
|
+
|
204
|
+
- Updates for JA and ZH locales
|
205
|
+
- Further optimizations for scheduled polling [#5513]
|
206
|
+
|
207
|
+
6.5.6
|
208
|
+
----------
|
209
|
+
|
210
|
+
- Fix deprecation warnings with redis-rb 4.8.0 [#5484]
|
211
|
+
- Lock redis-rb to < 5.0 as we are moving to redis-client in Sidekiq 7.0
|
4
212
|
|
5
213
|
6.5.5
|
6
214
|
----------
|
@@ -22,7 +230,7 @@
|
|
22
230
|
6.5.2
|
23
231
|
----------
|
24
232
|
|
25
|
-
- [Job Metrics are under active development, help wanted!](https://github.com/
|
233
|
+
- [Job Metrics are under active development, help wanted!](https://github.com/sidekiq/sidekiq/wiki/Metrics#contributing) **BETA**
|
26
234
|
- Add `Context` column on queue page which shows any CurrentAttributes [#5450]
|
27
235
|
- `sidekiq_retry_in` may now return `:discard` or `:kill` to dynamically stop job retries [#5406]
|
28
236
|
- Smarter sorting of processes in /busy Web UI [#5398]
|
@@ -41,7 +249,7 @@
|
|
41
249
|
- Substantial refactoring of Sidekiq server internals, part of a larger effort
|
42
250
|
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).
|
43
251
|
- **Add beta support for the `redis-client` gem**. This will become the default Redis driver in Sidekiq 7.0. [#5298]
|
44
|
-
Read more: https://github.com/
|
252
|
+
Read more: https://github.com/sidekiq/sidekiq/wiki/Using-redis-client
|
45
253
|
- **Add beta support for DB transaction-aware client** [#5291]
|
46
254
|
Add this line to your initializer and any jobs created during a transaction
|
47
255
|
will only be pushed to Redis **after the transaction commits**. You will need to add the
|
@@ -241,7 +449,7 @@ If this is a Rails app in API mode, you need to enable sessions.
|
|
241
449
|
---------
|
242
450
|
|
243
451
|
- **Integrate with systemd's watchdog and notification features** [#4488]
|
244
|
-
Set `Type=notify` in [sidekiq.service](https://github.com/
|
452
|
+
Set `Type=notify` in [sidekiq.service](https://github.com/sidekiq/sidekiq/blob/4b8a8bd3ae42f6e48ae1fdaf95ed7d7af18ed8bb/examples/systemd/sidekiq.service#L30-L39). The integration works automatically.
|
245
453
|
- Use `setTimeout` rather than `setInterval` to avoid thundering herd [#4480]
|
246
454
|
- Fix edge case where a job can be pushed without a queue.
|
247
455
|
- Flush job stats at exit [#4498]
|
@@ -254,7 +462,7 @@ If this is a Rails app in API mode, you need to enable sessions.
|
|
254
462
|
- Fix broken Web UI response when using NewRelic and Rack 2.1.2+. [#4440]
|
255
463
|
- Update APIs to use `UNLINK`, not `DEL`. [#4449]
|
256
464
|
- Fix Ruby 2.7 warnings [#4412]
|
257
|
-
- Add support for `APP_ENV` [[95fa5d9]](https://github.com/
|
465
|
+
- Add support for `APP_ENV` [[95fa5d9]](https://github.com/sidekiq/sidekiq/commit/95fa5d90192148026e52ca2902f1b83c70858ce8)
|
258
466
|
|
259
467
|
6.0.4
|
260
468
|
---------
|
@@ -366,7 +574,7 @@ Sidekiq.configure_server do |config|
|
|
366
574
|
config.log_formatter = Sidekiq::Logger::Formatters::JSON.new
|
367
575
|
end
|
368
576
|
```
|
369
|
-
See the [Logging wiki page](https://github.com/
|
577
|
+
See the [Logging wiki page](https://github.com/sidekiq/sidekiq/wiki/Logging) for more details.
|
370
578
|
- **BREAKING CHANGE** Validate proper usage of the `REDIS_PROVIDER`
|
371
579
|
variable. This variable is meant to hold the name of the environment
|
372
580
|
variable which contains your Redis URL, so that you can switch Redis
|
@@ -558,7 +766,7 @@ Sidekiq::Middleware::Server::Logging -> Sidekiq::JobLogger
|
|
558
766
|
- The `SomeWorker.set(options)` API was re-written to avoid thread-local state. [#2152]
|
559
767
|
- Sidekiq Enterprise's encrypted jobs now display "[encrypted data]" in the Web UI instead
|
560
768
|
of random hex bytes.
|
561
|
-
- Please see the [5.0 Upgrade notes](5.0-Upgrade.md) for more detail.
|
769
|
+
- Please see the [5.0 Upgrade notes](docs/5.0-Upgrade.md) for more detail.
|
562
770
|
|
563
771
|
4.2.10
|
564
772
|
-----------
|
@@ -776,7 +984,7 @@ Sidekiq::Queues.clear_all
|
|
776
984
|
- Sidekiq's internals have been completely overhauled for performance
|
777
985
|
and to remove dependencies. This has resulted in major speedups, as
|
778
986
|
[detailed on my blog](http://www.mikeperham.com/2015/10/14/optimizing-sidekiq/).
|
779
|
-
- See the [4.0 upgrade notes](4.0-Upgrade.md) for more detail.
|
987
|
+
- See the [4.0 upgrade notes](docs/4.0-Upgrade.md) for more detail.
|
780
988
|
|
781
989
|
3.5.4
|
782
990
|
-----------
|
@@ -813,7 +1021,7 @@ Sidekiq::Queues.clear_all
|
|
813
1021
|
- **FIX MEMORY LEAK** Under rare conditions, threads may leak [#2598, gazay]
|
814
1022
|
- Add Ukrainian locale [#2561, elrakita]
|
815
1023
|
- Disconnect and retry Redis operations if we see a READONLY error [#2550]
|
816
|
-
- Add server middleware testing harness; see [wiki](https://github.com/
|
1024
|
+
- Add server middleware testing harness; see [wiki](https://github.com/sidekiq/sidekiq/wiki/Testing#testing-server-middleware) [#2534, ryansch]
|
817
1025
|
|
818
1026
|
3.5.0
|
819
1027
|
-----------
|
@@ -831,7 +1039,7 @@ Sidekiq::Queues.clear_all
|
|
831
1039
|
- Fix CSRF vulnerability in Web UI, thanks to Egor Homakov for
|
832
1040
|
reporting. [#2422] If you are running the Web UI as a standalone Rack app,
|
833
1041
|
ensure you have a [session middleware
|
834
|
-
configured](https://github.com/
|
1042
|
+
configured](https://github.com/sidekiq/sidekiq/wiki/Monitoring#standalone):
|
835
1043
|
```ruby
|
836
1044
|
use Rack::Session::Cookie, :secret => "some unique secret string here"
|
837
1045
|
```
|
@@ -1043,7 +1251,7 @@ sidekiq_options :dead => false, :retry => 5
|
|
1043
1251
|
3.0.0
|
1044
1252
|
-----------
|
1045
1253
|
|
1046
|
-
Please see [3.0-Upgrade.md](3.0-Upgrade.md) for more comprehensive upgrade notes.
|
1254
|
+
Please see [3.0-Upgrade.md](docs/3.0-Upgrade.md) for more comprehensive upgrade notes.
|
1047
1255
|
|
1048
1256
|
- **Dead Job Queue** - jobs which run out of retries are now moved to a dead
|
1049
1257
|
job queue. These jobs must be retried manually or they will expire
|
@@ -1087,7 +1295,7 @@ Sidekiq::Client.via(ConnectionPool.new { Redis.new }) do
|
|
1087
1295
|
end
|
1088
1296
|
```
|
1089
1297
|
**Sharding support does require a breaking change to client-side
|
1090
|
-
middleware, see 3.0-Upgrade.md.**
|
1298
|
+
middleware, see docs/3.0-Upgrade.md.**
|
1091
1299
|
- New Chinese, Greek, Swedish and Czech translations for the Web UI.
|
1092
1300
|
- Updated most languages translations for the new UI features.
|
1093
1301
|
- **Remove official Capistrano integration** - this integration has been
|
@@ -1215,7 +1423,7 @@ middleware, see 3.0-Upgrade.md.**
|
|
1215
1423
|
appear to be doing any work. [#1194]
|
1216
1424
|
- Sidekiq's testing behavior is now dynamic. You can choose between
|
1217
1425
|
`inline` and `fake` behavior in your tests. See
|
1218
|
-
[Testing](https://github.com/
|
1426
|
+
[Testing](https://github.com/sidekiq/sidekiq/wiki/Testing) for detail. [#1193]
|
1219
1427
|
- The Retries table has a new column for the error message.
|
1220
1428
|
- The Web UI topbar now contains the status and live poll button.
|
1221
1429
|
- 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
|
[![Gem Version](https://badge.fury.io/rb/sidekiq.svg)](https://rubygems.org/gems/sidekiq)
|
5
|
-
![Build](https://github.com/
|
5
|
+
![Build](https://github.com/sidekiq/sidekiq/workflows/CI/badge.svg)
|
6
6
|
|
7
7
|
Simple, efficient background processing for Ruby.
|
8
8
|
|
@@ -10,27 +10,14 @@ 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:
|
31
|
-
- Ruby: MRI 2.
|
17
|
+
- Redis: 6.2+
|
18
|
+
- Ruby: MRI 2.7+ or JRuby 9.3+.
|
32
19
|
|
33
|
-
Sidekiq
|
20
|
+
Sidekiq 7.0 supports Rails 6.0+ but does not require it.
|
34
21
|
|
35
22
|
|
36
23
|
Installation
|
@@ -42,57 +29,78 @@ 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
|
-
![Web UI](https://github.com/
|
36
|
+
![Web UI](https://github.com/sidekiq/sidekiq/raw/main/examples/web-ui.png)
|
37
|
+
|
38
|
+
Performance
|
39
|
+
---------------
|
50
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
|
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
|
-------------------
|
54
61
|
|
62
|
+
Use `bundle up sidekiq` to upgrade Sidekiq and all its dependencies.
|
63
|
+
Upgrade notes between each major version can be found in the `docs/` directory.
|
64
|
+
|
55
65
|
I also sell Sidekiq Pro and Sidekiq Enterprise, extensions to Sidekiq which provide more
|
56
66
|
features, a commercial-friendly license and allow you to support high
|
57
67
|
quality open source development all at the same time. Please see the
|
58
68
|
[Sidekiq](https://sidekiq.org/) homepage for more detail.
|
59
69
|
|
60
|
-
Subscribe to the **[quarterly newsletter](https://tinyletter.com/sidekiq)** to stay informed about the latest
|
61
|
-
features and changes to Sidekiq and its bigger siblings.
|
62
|
-
|
63
70
|
|
64
71
|
Problems?
|
65
72
|
-----------------
|
66
73
|
|
67
|
-
**Please do not directly email any Sidekiq committers with questions or problems.**
|
74
|
+
**Please do not directly email any Sidekiq committers with questions or problems.**
|
75
|
+
A community is best served when discussions are held in public.
|
68
76
|
|
69
|
-
If you have a problem, please review the [FAQ](https://github.com/
|
70
|
-
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.
|
71
79
|
|
72
|
-
Sidekiq Pro and Sidekiq Enterprise customers get private email support.
|
80
|
+
Sidekiq Pro and Sidekiq Enterprise customers get private email support.
|
81
|
+
You can purchase at https://sidekiq.org; email support@contribsys.com for help.
|
73
82
|
|
74
83
|
Useful resources:
|
75
84
|
|
76
|
-
* Product documentation is in the [wiki](https://github.com/
|
77
|
-
* 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.
|
78
87
|
* The [Sidekiq tag](https://stackoverflow.com/questions/tagged/sidekiq) on Stack Overflow has lots of useful Q & A.
|
79
88
|
|
80
|
-
Every Friday morning is Sidekiq
|
89
|
+
Every Friday morning is Sidekiq office hour: I video chat and answer questions.
|
81
90
|
See the [Sidekiq support page](https://sidekiq.org/support.html) for details.
|
82
91
|
|
83
92
|
Contributing
|
84
93
|
-----------------
|
85
94
|
|
86
|
-
Please see [the contributing guidelines](https://github.com/
|
87
|
-
|
95
|
+
Please see [the contributing guidelines](https://github.com/sidekiq/sidekiq/blob/main/.github/contributing.md).
|
88
96
|
|
89
97
|
License
|
90
98
|
-----------------
|
91
99
|
|
92
|
-
Please see [LICENSE](https://github.com/
|
93
|
-
|
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).
|
94
102
|
|
95
103
|
Author
|
96
104
|
-----------------
|
97
105
|
|
98
|
-
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)
|
data/bin/sidekiq
CHANGED
@@ -10,7 +10,7 @@ def integrate_with_systemd
|
|
10
10
|
return unless ENV["NOTIFY_SOCKET"]
|
11
11
|
|
12
12
|
Sidekiq.configure_server do |config|
|
13
|
-
|
13
|
+
config.logger.info "Enabling systemd notification integration"
|
14
14
|
require "sidekiq/sd_notify"
|
15
15
|
config.on(:startup) do
|
16
16
|
Sidekiq::SdNotify.ready
|
@@ -31,12 +31,7 @@ begin
|
|
31
31
|
cli.run
|
32
32
|
rescue => e
|
33
33
|
raise e if $DEBUG
|
34
|
-
|
35
|
-
|
36
|
-
warn e.backtrace.join("\n")
|
37
|
-
else
|
38
|
-
cli.handle_exception e
|
39
|
-
end
|
40
|
-
|
34
|
+
warn e.message
|
35
|
+
warn e.backtrace.join("\n")
|
41
36
|
exit 1
|
42
37
|
end
|