sidekiq 6.5.8 → 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 +4 -4
- data/Changes.md +133 -15
- data/README.md +40 -32
- data/bin/sidekiq +3 -8
- data/bin/sidekiqload +204 -118
- data/bin/sidekiqmon +3 -0
- data/lib/sidekiq/api.rb +114 -128
- data/lib/sidekiq/capsule.rb +127 -0
- data/lib/sidekiq/cli.rb +57 -74
- data/lib/sidekiq/client.rb +63 -37
- data/lib/sidekiq/component.rb +4 -1
- 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 +11 -14
- data/lib/sidekiq/job.rb +371 -10
- data/lib/sidekiq/job_logger.rb +2 -2
- data/lib/sidekiq/job_retry.rb +17 -14
- data/lib/sidekiq/job_util.rb +49 -15
- data/lib/sidekiq/launcher.rb +66 -62
- data/lib/sidekiq/logger.rb +1 -26
- data/lib/sidekiq/manager.rb +9 -11
- data/lib/sidekiq/metrics/query.rb +4 -4
- data/lib/sidekiq/metrics/shared.rb +7 -6
- data/lib/sidekiq/metrics/tracking.rb +20 -18
- data/lib/sidekiq/middleware/chain.rb +19 -18
- data/lib/sidekiq/middleware/current_attributes.rb +52 -20
- data/lib/sidekiq/monitor.rb +17 -4
- data/lib/sidekiq/paginator.rb +3 -3
- data/lib/sidekiq/processor.rb +21 -27
- data/lib/sidekiq/rails.rb +12 -7
- data/lib/sidekiq/redis_client_adapter.rb +11 -69
- data/lib/sidekiq/redis_connection.rb +11 -111
- data/lib/sidekiq/scheduled.rb +21 -22
- data/lib/sidekiq/testing.rb +5 -33
- data/lib/sidekiq/transaction_aware_client.rb +4 -5
- data/lib/sidekiq/version.rb +2 -1
- data/lib/sidekiq/web/application.rb +21 -6
- data/lib/sidekiq/web/csrf_protection.rb +1 -1
- data/lib/sidekiq/web/helpers.rb +19 -18
- data/lib/sidekiq/web.rb +7 -18
- 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 +18 -0
- data/web/assets/javascripts/base-charts.js +106 -0
- data/web/assets/javascripts/dashboard-charts.js +166 -0
- data/web/assets/javascripts/dashboard.js +3 -223
- data/web/assets/javascripts/metrics.js +117 -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 +23 -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 +76 -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 +67 -69
- 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 +59 -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 +20 -18
- data/web/locales/zh-tw.yml +10 -1
- 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/busy.erb +39 -28
- data/web/views/dashboard.erb +36 -5
- data/web/views/metrics.erb +33 -20
- data/web/views/metrics_for_job.erb +25 -44
- data/web/views/morgue.erb +5 -9
- data/web/views/queue.erb +10 -14
- data/web/views/queues.erb +3 -1
- data/web/views/retries.erb +5 -9
- data/web/views/scheduled.erb +12 -13
- metadata +43 -39
- 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 -370
- 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: 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,125 @@
|
|
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]
|
4
123
|
|
5
124
|
6.5.8
|
6
125
|
----------
|
@@ -8,8 +127,7 @@
|
|
8
127
|
- Fail if using a bad version of scout_apm [#5616]
|
9
128
|
- Add pagination to Busy page [#5556]
|
10
129
|
- Speed up WorkSet#each [#5559]
|
11
|
-
- Adjust CurrentAttributes to work with the String class name so we aren't referencing
|
12
|
-
the Class within a Rails initializer [#5536]
|
130
|
+
- Adjust CurrentAttributes to work with the String class name so we aren't referencing the Class within a Rails initializer [#5536]
|
13
131
|
|
14
132
|
6.5.7
|
15
133
|
----------
|
@@ -43,7 +161,7 @@ the Class within a Rails initializer [#5536]
|
|
43
161
|
6.5.2
|
44
162
|
----------
|
45
163
|
|
46
|
-
- [Job Metrics are under active development, help wanted!](https://github.com/
|
164
|
+
- [Job Metrics are under active development, help wanted!](https://github.com/sidekiq/sidekiq/wiki/Metrics#contributing) **BETA**
|
47
165
|
- Add `Context` column on queue page which shows any CurrentAttributes [#5450]
|
48
166
|
- `sidekiq_retry_in` may now return `:discard` or `:kill` to dynamically stop job retries [#5406]
|
49
167
|
- Smarter sorting of processes in /busy Web UI [#5398]
|
@@ -62,7 +180,7 @@ the Class within a Rails initializer [#5536]
|
|
62
180
|
- Substantial refactoring of Sidekiq server internals, part of a larger effort
|
63
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).
|
64
182
|
- **Add beta support for the `redis-client` gem**. This will become the default Redis driver in Sidekiq 7.0. [#5298]
|
65
|
-
Read more: https://github.com/
|
183
|
+
Read more: https://github.com/sidekiq/sidekiq/wiki/Using-redis-client
|
66
184
|
- **Add beta support for DB transaction-aware client** [#5291]
|
67
185
|
Add this line to your initializer and any jobs created during a transaction
|
68
186
|
will only be pushed to Redis **after the transaction commits**. You will need to add the
|
@@ -262,7 +380,7 @@ If this is a Rails app in API mode, you need to enable sessions.
|
|
262
380
|
---------
|
263
381
|
|
264
382
|
- **Integrate with systemd's watchdog and notification features** [#4488]
|
265
|
-
Set `Type=notify` in [sidekiq.service](https://github.com/
|
383
|
+
Set `Type=notify` in [sidekiq.service](https://github.com/sidekiq/sidekiq/blob/4b8a8bd3ae42f6e48ae1fdaf95ed7d7af18ed8bb/examples/systemd/sidekiq.service#L30-L39). The integration works automatically.
|
266
384
|
- Use `setTimeout` rather than `setInterval` to avoid thundering herd [#4480]
|
267
385
|
- Fix edge case where a job can be pushed without a queue.
|
268
386
|
- Flush job stats at exit [#4498]
|
@@ -275,7 +393,7 @@ If this is a Rails app in API mode, you need to enable sessions.
|
|
275
393
|
- Fix broken Web UI response when using NewRelic and Rack 2.1.2+. [#4440]
|
276
394
|
- Update APIs to use `UNLINK`, not `DEL`. [#4449]
|
277
395
|
- Fix Ruby 2.7 warnings [#4412]
|
278
|
-
- Add support for `APP_ENV` [[95fa5d9]](https://github.com/
|
396
|
+
- Add support for `APP_ENV` [[95fa5d9]](https://github.com/sidekiq/sidekiq/commit/95fa5d90192148026e52ca2902f1b83c70858ce8)
|
279
397
|
|
280
398
|
6.0.4
|
281
399
|
---------
|
@@ -387,7 +505,7 @@ Sidekiq.configure_server do |config|
|
|
387
505
|
config.log_formatter = Sidekiq::Logger::Formatters::JSON.new
|
388
506
|
end
|
389
507
|
```
|
390
|
-
See the [Logging wiki page](https://github.com/
|
508
|
+
See the [Logging wiki page](https://github.com/sidekiq/sidekiq/wiki/Logging) for more details.
|
391
509
|
- **BREAKING CHANGE** Validate proper usage of the `REDIS_PROVIDER`
|
392
510
|
variable. This variable is meant to hold the name of the environment
|
393
511
|
variable which contains your Redis URL, so that you can switch Redis
|
@@ -579,7 +697,7 @@ Sidekiq::Middleware::Server::Logging -> Sidekiq::JobLogger
|
|
579
697
|
- The `SomeWorker.set(options)` API was re-written to avoid thread-local state. [#2152]
|
580
698
|
- Sidekiq Enterprise's encrypted jobs now display "[encrypted data]" in the Web UI instead
|
581
699
|
of random hex bytes.
|
582
|
-
- 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.
|
583
701
|
|
584
702
|
4.2.10
|
585
703
|
-----------
|
@@ -797,7 +915,7 @@ Sidekiq::Queues.clear_all
|
|
797
915
|
- Sidekiq's internals have been completely overhauled for performance
|
798
916
|
and to remove dependencies. This has resulted in major speedups, as
|
799
917
|
[detailed on my blog](http://www.mikeperham.com/2015/10/14/optimizing-sidekiq/).
|
800
|
-
- 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.
|
801
919
|
|
802
920
|
3.5.4
|
803
921
|
-----------
|
@@ -834,7 +952,7 @@ Sidekiq::Queues.clear_all
|
|
834
952
|
- **FIX MEMORY LEAK** Under rare conditions, threads may leak [#2598, gazay]
|
835
953
|
- Add Ukrainian locale [#2561, elrakita]
|
836
954
|
- Disconnect and retry Redis operations if we see a READONLY error [#2550]
|
837
|
-
- 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]
|
838
956
|
|
839
957
|
3.5.0
|
840
958
|
-----------
|
@@ -852,7 +970,7 @@ Sidekiq::Queues.clear_all
|
|
852
970
|
- Fix CSRF vulnerability in Web UI, thanks to Egor Homakov for
|
853
971
|
reporting. [#2422] If you are running the Web UI as a standalone Rack app,
|
854
972
|
ensure you have a [session middleware
|
855
|
-
configured](https://github.com/
|
973
|
+
configured](https://github.com/sidekiq/sidekiq/wiki/Monitoring#standalone):
|
856
974
|
```ruby
|
857
975
|
use Rack::Session::Cookie, :secret => "some unique secret string here"
|
858
976
|
```
|
@@ -1064,7 +1182,7 @@ sidekiq_options :dead => false, :retry => 5
|
|
1064
1182
|
3.0.0
|
1065
1183
|
-----------
|
1066
1184
|
|
1067
|
-
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.
|
1068
1186
|
|
1069
1187
|
- **Dead Job Queue** - jobs which run out of retries are now moved to a dead
|
1070
1188
|
job queue. These jobs must be retried manually or they will expire
|
@@ -1108,7 +1226,7 @@ Sidekiq::Client.via(ConnectionPool.new { Redis.new }) do
|
|
1108
1226
|
end
|
1109
1227
|
```
|
1110
1228
|
**Sharding support does require a breaking change to client-side
|
1111
|
-
middleware, see 3.0-Upgrade.md.**
|
1229
|
+
middleware, see docs/3.0-Upgrade.md.**
|
1112
1230
|
- New Chinese, Greek, Swedish and Czech translations for the Web UI.
|
1113
1231
|
- Updated most languages translations for the new UI features.
|
1114
1232
|
- **Remove official Capistrano integration** - this integration has been
|
@@ -1236,7 +1354,7 @@ middleware, see 3.0-Upgrade.md.**
|
|
1236
1354
|
appear to be doing any work. [#1194]
|
1237
1355
|
- Sidekiq's testing behavior is now dynamic. You can choose between
|
1238
1356
|
`inline` and `fake` behavior in your tests. See
|
1239
|
-
[Testing](https://github.com/
|
1357
|
+
[Testing](https://github.com/sidekiq/sidekiq/wiki/Testing) for detail. [#1193]
|
1240
1358
|
- The Retries table has a new column for the error message.
|
1241
1359
|
- The Web UI topbar now contains the status and live poll button.
|
1242
1360
|
- 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,55 +29,76 @@ 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/
|
85
|
+
* Product documentation is in the [wiki](https://github.com/sidekiq/sidekiq/wiki).
|
77
86
|
* Occasional announcements are made to the [@sidekiq](https://twitter.com/sidekiq) Twitter 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
|
-----------------
|
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
|