sidekiq 6.5.12 → 7.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. checksums.yaml +4 -4
  2. data/Changes.md +224 -20
  3. data/README.md +43 -35
  4. data/bin/multi_queue_bench +271 -0
  5. data/bin/sidekiq +3 -8
  6. data/bin/sidekiqload +204 -118
  7. data/bin/sidekiqmon +3 -0
  8. data/lib/sidekiq/api.rb +187 -135
  9. data/lib/sidekiq/capsule.rb +127 -0
  10. data/lib/sidekiq/cli.rb +59 -75
  11. data/lib/sidekiq/client.rb +66 -37
  12. data/lib/sidekiq/component.rb +4 -1
  13. data/lib/sidekiq/config.rb +287 -0
  14. data/lib/sidekiq/deploy.rb +62 -0
  15. data/lib/sidekiq/embedded.rb +61 -0
  16. data/lib/sidekiq/fetch.rb +11 -14
  17. data/lib/sidekiq/job.rb +371 -10
  18. data/lib/sidekiq/job_logger.rb +2 -2
  19. data/lib/sidekiq/job_retry.rb +36 -18
  20. data/lib/sidekiq/job_util.rb +51 -15
  21. data/lib/sidekiq/launcher.rb +71 -65
  22. data/lib/sidekiq/logger.rb +2 -27
  23. data/lib/sidekiq/manager.rb +9 -11
  24. data/lib/sidekiq/metrics/query.rb +7 -4
  25. data/lib/sidekiq/metrics/shared.rb +8 -7
  26. data/lib/sidekiq/metrics/tracking.rb +27 -21
  27. data/lib/sidekiq/middleware/chain.rb +19 -18
  28. data/lib/sidekiq/middleware/current_attributes.rb +52 -20
  29. data/lib/sidekiq/monitor.rb +16 -3
  30. data/lib/sidekiq/paginator.rb +2 -2
  31. data/lib/sidekiq/processor.rb +46 -51
  32. data/lib/sidekiq/rails.rb +15 -10
  33. data/lib/sidekiq/redis_client_adapter.rb +23 -66
  34. data/lib/sidekiq/redis_connection.rb +15 -117
  35. data/lib/sidekiq/scheduled.rb +22 -23
  36. data/lib/sidekiq/testing.rb +32 -41
  37. data/lib/sidekiq/transaction_aware_client.rb +11 -5
  38. data/lib/sidekiq/version.rb +2 -1
  39. data/lib/sidekiq/web/action.rb +8 -3
  40. data/lib/sidekiq/web/application.rb +108 -15
  41. data/lib/sidekiq/web/csrf_protection.rb +10 -7
  42. data/lib/sidekiq/web/helpers.rb +52 -38
  43. data/lib/sidekiq/web.rb +17 -16
  44. data/lib/sidekiq/worker_compatibility_alias.rb +13 -0
  45. data/lib/sidekiq.rb +76 -274
  46. data/sidekiq.gemspec +12 -10
  47. data/web/assets/javascripts/application.js +39 -0
  48. data/web/assets/javascripts/base-charts.js +106 -0
  49. data/web/assets/javascripts/dashboard-charts.js +182 -0
  50. data/web/assets/javascripts/dashboard.js +10 -232
  51. data/web/assets/javascripts/metrics.js +151 -115
  52. data/web/assets/stylesheets/application-dark.css +4 -0
  53. data/web/assets/stylesheets/application-rtl.css +10 -89
  54. data/web/assets/stylesheets/application.css +45 -298
  55. data/web/locales/ar.yml +70 -70
  56. data/web/locales/cs.yml +62 -62
  57. data/web/locales/da.yml +60 -53
  58. data/web/locales/de.yml +65 -65
  59. data/web/locales/el.yml +2 -7
  60. data/web/locales/en.yml +78 -70
  61. data/web/locales/es.yml +68 -68
  62. data/web/locales/fa.yml +65 -65
  63. data/web/locales/fr.yml +81 -67
  64. data/web/locales/gd.yml +99 -0
  65. data/web/locales/he.yml +65 -64
  66. data/web/locales/hi.yml +59 -59
  67. data/web/locales/it.yml +53 -53
  68. data/web/locales/ja.yml +67 -69
  69. data/web/locales/ko.yml +52 -52
  70. data/web/locales/lt.yml +66 -66
  71. data/web/locales/nb.yml +61 -61
  72. data/web/locales/nl.yml +52 -52
  73. data/web/locales/pl.yml +45 -45
  74. data/web/locales/pt-br.yml +79 -69
  75. data/web/locales/pt.yml +51 -51
  76. data/web/locales/ru.yml +67 -66
  77. data/web/locales/sv.yml +53 -53
  78. data/web/locales/ta.yml +60 -60
  79. data/web/locales/uk.yml +62 -61
  80. data/web/locales/ur.yml +64 -64
  81. data/web/locales/vi.yml +67 -67
  82. data/web/locales/zh-cn.yml +20 -18
  83. data/web/locales/zh-tw.yml +10 -1
  84. data/web/views/_footer.erb +17 -2
  85. data/web/views/_job_info.erb +18 -2
  86. data/web/views/_metrics_period_select.erb +12 -0
  87. data/web/views/_paging.erb +2 -0
  88. data/web/views/_poll_link.erb +1 -1
  89. data/web/views/_summary.erb +7 -7
  90. data/web/views/busy.erb +46 -35
  91. data/web/views/dashboard.erb +26 -5
  92. data/web/views/filtering.erb +7 -0
  93. data/web/views/metrics.erb +46 -24
  94. data/web/views/metrics_for_job.erb +41 -69
  95. data/web/views/morgue.erb +5 -9
  96. data/web/views/queue.erb +10 -14
  97. data/web/views/queues.erb +9 -3
  98. data/web/views/retries.erb +5 -9
  99. data/web/views/scheduled.erb +12 -13
  100. metadata +44 -38
  101. data/lib/sidekiq/delay.rb +0 -43
  102. data/lib/sidekiq/extensions/action_mailer.rb +0 -48
  103. data/lib/sidekiq/extensions/active_record.rb +0 -43
  104. data/lib/sidekiq/extensions/class_methods.rb +0 -43
  105. data/lib/sidekiq/extensions/generic_proxy.rb +0 -33
  106. data/lib/sidekiq/metrics/deploy.rb +0 -47
  107. data/lib/sidekiq/worker.rb +0 -370
  108. data/web/assets/javascripts/graph.js +0 -16
  109. /data/{LICENSE → LICENSE.txt} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 55c6f9a8c0f2810bcbe7744c95204893d73f534666f6091c74dcb5199e7a4a28
4
- data.tar.gz: c42690ef0d1876c94eb51fb68319275d11f10169826180db921b34d6334a1a54
3
+ metadata.gz: 6c43e6b585c25dcfc8ef8364bb36cf74f9167b981ad03faa3a8d76e0d45ebe55
4
+ data.tar.gz: d8c65dc03008f7280b36af94db753d4c7f68267c2eb0d78cd018322887aabbb0
5
5
  SHA512:
6
- metadata.gz: 461b559e18cbdf8fe6ba20ab9fa38d08fd3b7b8d14dce7a7f9369d678e92bd25c07734bc14b0167f83589c0f03501897195b3fdf9cfd5de5a60f039bf7436f98
7
- data.tar.gz: ce0490b438a22a71c37e5a65193a7728e3297b437730d30a3653807ff1e89476db1f8c62d8de50c0c8cebbbce2ba6fb65f110855e071c62746fe8697a0f636e1
6
+ metadata.gz: d2687692b873ab82bda2ad32e9be795150cd0a8d3d330bc19f5b509ba729bef33189e06ebac86b1906c2682187391d6cf0d532e47d03fcbea83058109c5816ef
7
+ data.tar.gz: 431a482baeb03fc4de50fbdfba8717fc332a9d6564fde98a77699a7bd174fa3194431385951cf689c64e04853039c95fcf287084f283e8d381b3b37d5bc665e0
data/Changes.md CHANGED
@@ -1,17 +1,222 @@
1
1
  # Sidekiq Changes
2
2
 
3
- [Sidekiq Changes](https://github.com/mperham/sidekiq/blob/main/Changes.md) | [Sidekiq Pro Changes](https://github.com/mperham/sidekiq/blob/main/Pro-Changes.md) | [Sidekiq Enterprise Changes](https://github.com/mperham/sidekiq/blob/main/Ent-Changes.md)
3
+ [Sidekiq Changes](https://github.com/sidekiq/sidekiq/blob/main/Changes.md) | [Sidekiq Pro Changes](https://github.com/sidekiq/sidekiq/blob/main/Pro-Changes.md) | [Sidekiq Enterprise Changes](https://github.com/sidekiq/sidekiq/blob/main/Ent-Changes.md)
4
4
 
5
- 6.5.11
5
+ 7.2.4
6
6
  ----------
7
7
 
8
- - Fix for Rails 7.1 [#6067]
8
+ - Fix XSS in metrics filtering introduced in 7.2.0, CVE-2024-32887
9
+ Thanks to @UmerAdeemCheema for the security report.
9
10
 
10
- 6.5.10
11
+ 7.2.3
11
12
  ----------
12
13
 
13
- - Web UI DoS vector [#6045] CVE-2023-26141
14
- - Fix broadcast logger with Rails 7.1 [#6054]
14
+ - [Support Dragonfly.io](https://www.mikeperham.com/2024/02/01/supporting-dragonfly/) as an alternative Redis implementation
15
+ - Fix error unpacking some compressed error backtraces [#6241]
16
+ - Fix potential heartbeat data leak [#6227]
17
+ - Add ability to find a currently running work by jid [#6212, fatkodima]
18
+
19
+ 7.2.2
20
+ ----------
21
+
22
+ - Add `Process.warmup` call in Ruby 3.3+
23
+ - Batch jobs now skip transactional push [#6160]
24
+
25
+ 7.2.1
26
+ ----------
27
+
28
+ - Add `Sidekiq::Work` type which replaces the raw Hash as the third parameter in
29
+ `Sidekiq::WorkSet#each { |pid, tid, hash| ... }` [#6145]
30
+ - **DEPRECATED**: direct access to the attributes within the `hash` block parameter above.
31
+ The `Sidekiq::Work` instance contains accessor methods to get at the same data, e.g.
32
+ ```ruby
33
+ work["queue"] # Old
34
+ work.queue # New
35
+ ```
36
+ - Fix Ruby 3.3 warnings around `base64` gem [#6151, earlopain]
37
+
38
+ 7.2.0
39
+ ----------
40
+
41
+ - `sidekiq_retries_exhausted` can return `:discard` to avoid the deadset
42
+ and all death handlers [#6091]
43
+ - Metrics filtering by job class in Web UI [#5974]
44
+ - Better readability and formatting for numbers within the Web UI [#6080]
45
+ - Add explicit error if user code tries to nest test modes [#6078]
46
+ ```ruby
47
+ Sidekiq::Testing.inline! # global setting
48
+ Sidekiq::Testing.fake! do # override within block
49
+ # ok
50
+ Sidekiq::Testing.inline! do # can't override the override
51
+ # not ok, nested
52
+ end
53
+ end
54
+ ```
55
+ - **SECURITY** Forbid inline JavaScript execution in Web UI [#6074]
56
+ - Adjust redis-client adapter to avoid `method_missing` [#6083]
57
+ This can result in app code breaking if your app's Redis API usage was
58
+ depending on Sidekiq's adapter to correct invalid redis-client API usage.
59
+ One example:
60
+ ```ruby
61
+ # bad, not redis-client native
62
+ # Unsupported command argument type: TrueClass (TypeError)
63
+ Sidekiq.redis { |c| c.set("key", "value", nx: true, ex: 15) }
64
+ # good
65
+ Sidekiq.redis { |c| c.set("key", "value", "nx", "ex", 15) }
66
+ ```
67
+
68
+ 7.1.6
69
+ ----------
70
+
71
+ - The block forms of testing modes (inline, fake) are now thread-safe so you can have
72
+ a multithreaded test suite which uses different modes for different tests. [#6069]
73
+ - Fix breakage with non-Proc error handlers [#6065]
74
+
75
+ 7.1.5
76
+ ----------
77
+
78
+ - **FEATURE**: Job filtering within the Web UI. This feature has been open
79
+ sourced from Sidekiq Pro. [#6052]
80
+ - **API CHANGE** Error handlers now take three arguments `->(ex, context, config)`.
81
+ The previous calling convention will work until Sidekiq 8.0 but will print
82
+ out a deprecation warning. [#6051]
83
+ - Fix issue with the `batch_size` and `at` options in `S::Client.push_bulk` [#6040]
84
+ - Fix inline testing firing batch callbacks early [#6057]
85
+ - Use new log broadcast API in Rails 7.1 [#6054]
86
+ - Crash if user tries to use RESP2 `protocol: 2` [#6061]
87
+
88
+ 7.1.4
89
+ ----------
90
+
91
+ - Fix empty `retry_for` logic [#6035]
92
+
93
+ 7.1.3
94
+ ----------
95
+
96
+ - Add `sidekiq_options retry_for: 48.hours` to allow time-based retry windows [#6029]
97
+ - Support sidekiq_retry_in and sidekiq_retries_exhausted_block in ActiveJobs (#5994)
98
+ - Lowercase all Rack headers for Rack 3.0 [#5951]
99
+ - Validate Sidekiq::Web page refresh delay to avoid potential DoS,
100
+ CVE-2023-26141, thanks for reporting Keegan!
101
+
102
+ 7.1.2
103
+ ----------
104
+
105
+ - Mark Web UI assets as private so CDNs won't cache them [#5936]
106
+ - Fix stackoverflow when using Oj and the JSON log formatter [#5920]
107
+ - Remove spurious `enqueued_at` from scheduled ActiveJobs [#5937]
108
+
109
+ 7.1.1
110
+ ----------
111
+
112
+ - Support multiple CurrentAttributes [#5904]
113
+ - Speed up latency fetch with large queues on Redis <7 [#5910]
114
+ - Allow a larger default client pool [#5886]
115
+ - Ensure Sidekiq.options[:environment] == RAILS_ENV [#5932]
116
+
117
+ 7.1.0
118
+ ----------
119
+
120
+ - Improve display of ActiveJob arguments in Web UI [#5825, cover]
121
+ - Update `push_bulk` to push `batch_size` jobs at a time and allow laziness [#5827, fatkodima]
122
+ This allows Sidekiq::Client to push unlimited jobs as long as it has enough memory for the batch_size.
123
+ - Update `perform_bulk` to use `push_bulk` internally.
124
+ - Change return value of `push_bulk` to map 1-to-1 with arguments.
125
+ If you call `push_bulk(args: [[1], [2], [3]])`, you will now always get
126
+ an array of 3 values as the result: `["jid1", nil, "jid3"]` where nil means
127
+ that particular job did not push successfully (possibly due to middleware
128
+ stopping it). Previously nil values were removed so it was impossible to tell
129
+ which jobs pushed successfully and which did not.
130
+ - Migrate away from all deprecated Redis commands [#5788]
131
+ Sidekiq will now print a warning if you use one of those deprecated commands.
132
+ - Prefix all Sidekiq thread names [#5872]
133
+
134
+ 7.0.9
135
+ ----------
136
+
137
+ - Restore confirmation dialogs in Web UI [#5881, shevaun]
138
+ - Increase fetch timeout to minimize ReadTimeoutError [#5874]
139
+ - Reverse histogram tooltip ordering [#5868]
140
+ - Add Scottish Gaelic (gd) locale [#5867, GunChleoc]
141
+
142
+ 7.0.8
143
+ ----------
144
+
145
+ - **SECURITY** Sanitize `period` input parameter on Metrics pages.
146
+ Specially crafted values can lead to XSS. This functionality
147
+ was introduced in 7.0.4. Thank you to spercex @ huntr.dev [#5694]
148
+ - Add job hash as 3rd parameter to the `sidekiq_retry_in` block.
149
+
150
+ 7.0.7
151
+ ----------
152
+
153
+ - Fix redis-client API usage which could result in stuck Redis
154
+ connections [#5823]
155
+ - Fix AS::Duration with `sidekiq_retry_in` [#5806]
156
+ - Restore dumping config options on startup with `-v` [#5822]
157
+
158
+ 7.0.5,7.0.6
159
+ ----------
160
+
161
+ - More context for debugging json unsafe errors [#5787]
162
+
163
+ 7.0.4
164
+ ----------
165
+
166
+ - Performance and memory optimizations [#5768, fatkodima]
167
+ - Add 1-8 hour period selector to Metrics pages [#5694]
168
+ - Fix process display with `sidekiqmon` [#5733]
169
+
170
+ 7.0.3
171
+ ----------
172
+
173
+ - Don't warn about memory policy on Redis Enterprise [#5712]
174
+ - Don't allow Quiet/Stop on embedded Sidekiq instances [#5716]
175
+ - Fix `size: X` for configuring the default Redis pool size [#5702]
176
+ - Improve the display of queue weights on Busy page [#5642]
177
+ - Freeze CurrentAttributes on a job once initially set [#5692]
178
+
179
+ 7.0.2
180
+ ----------
181
+
182
+ - Improve compatibility with custom loggers [#5673]
183
+ - Add queue weights on Busy page [#5640]
184
+ - Add BID link on job_info page if job is part of a Batch [#5623]
185
+ - Allow custom extensions to add rows/links within Job detail pages [#5624]
186
+ ```ruby
187
+ Sidekiq::Web.custom_job_info_rows << AddAccountLink.new
188
+
189
+ class AddAccountLink
190
+ include CGI::Util
191
+ def add_pair(job)
192
+ # yield a (name, value) pair
193
+ # You can include HTML tags and CSS, Sidekiq does not do any
194
+ # escaping so beware user data injection! Note how we use CGI's
195
+ # `h` escape helper.
196
+ aid = job["account_id"]
197
+ yield "Account", "<a href='/accounts/#{h aid}'>#{h aid}</a>" if aid
198
+ end
199
+ end
200
+ ```
201
+
202
+ 7.0.1
203
+ ----------
204
+
205
+ - Allow an embedding process to reuse its own heartbeat thread
206
+ - Update zh-cn localization
207
+
208
+ 7.0.0
209
+ ----------
210
+
211
+ - Embedded mode!
212
+ - Capsules!!
213
+ - Job Execution metrics!!!
214
+ - See `docs/7.0-Upgrade.md` for release notes
215
+
216
+ 6.5.{10,11,12}
217
+ ----------
218
+
219
+ - Fixes for Rails 7.1 [#6067, #6070]
15
220
 
16
221
  6.5.9
17
222
  ----------
@@ -24,8 +229,7 @@
24
229
  - Fail if using a bad version of scout_apm [#5616]
25
230
  - Add pagination to Busy page [#5556]
26
231
  - Speed up WorkSet#each [#5559]
27
- - Adjust CurrentAttributes to work with the String class name so we aren't referencing
28
- the Class within a Rails initializer [#5536]
232
+ - Adjust CurrentAttributes to work with the String class name so we aren't referencing the Class within a Rails initializer [#5536]
29
233
 
30
234
  6.5.7
31
235
  ----------
@@ -59,7 +263,7 @@ the Class within a Rails initializer [#5536]
59
263
  6.5.2
60
264
  ----------
61
265
 
62
- - [Job Metrics are under active development, help wanted!](https://github.com/mperham/sidekiq/wiki/Metrics#contributing) **BETA**
266
+ - [Job Metrics are under active development, help wanted!](https://github.com/sidekiq/sidekiq/wiki/Metrics#contributing) **BETA**
63
267
  - Add `Context` column on queue page which shows any CurrentAttributes [#5450]
64
268
  - `sidekiq_retry_in` may now return `:discard` or `:kill` to dynamically stop job retries [#5406]
65
269
  - Smarter sorting of processes in /busy Web UI [#5398]
@@ -78,7 +282,7 @@ the Class within a Rails initializer [#5536]
78
282
  - Substantial refactoring of Sidekiq server internals, part of a larger effort
79
283
  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).
80
284
  - **Add beta support for the `redis-client` gem**. This will become the default Redis driver in Sidekiq 7.0. [#5298]
81
- Read more: https://github.com/mperham/sidekiq/wiki/Using-redis-client
285
+ Read more: https://github.com/sidekiq/sidekiq/wiki/Using-redis-client
82
286
  - **Add beta support for DB transaction-aware client** [#5291]
83
287
  Add this line to your initializer and any jobs created during a transaction
84
288
  will only be pushed to Redis **after the transaction commits**. You will need to add the
@@ -278,7 +482,7 @@ If this is a Rails app in API mode, you need to enable sessions.
278
482
  ---------
279
483
 
280
484
  - **Integrate with systemd's watchdog and notification features** [#4488]
281
- Set `Type=notify` in [sidekiq.service](https://github.com/mperham/sidekiq/blob/4b8a8bd3ae42f6e48ae1fdaf95ed7d7af18ed8bb/examples/systemd/sidekiq.service#L30-L39). The integration works automatically.
485
+ Set `Type=notify` in [sidekiq.service](https://github.com/sidekiq/sidekiq/blob/4b8a8bd3ae42f6e48ae1fdaf95ed7d7af18ed8bb/examples/systemd/sidekiq.service#L30-L39). The integration works automatically.
282
486
  - Use `setTimeout` rather than `setInterval` to avoid thundering herd [#4480]
283
487
  - Fix edge case where a job can be pushed without a queue.
284
488
  - Flush job stats at exit [#4498]
@@ -291,7 +495,7 @@ If this is a Rails app in API mode, you need to enable sessions.
291
495
  - Fix broken Web UI response when using NewRelic and Rack 2.1.2+. [#4440]
292
496
  - Update APIs to use `UNLINK`, not `DEL`. [#4449]
293
497
  - Fix Ruby 2.7 warnings [#4412]
294
- - Add support for `APP_ENV` [[95fa5d9]](https://github.com/mperham/sidekiq/commit/95fa5d90192148026e52ca2902f1b83c70858ce8)
498
+ - Add support for `APP_ENV` [[95fa5d9]](https://github.com/sidekiq/sidekiq/commit/95fa5d90192148026e52ca2902f1b83c70858ce8)
295
499
 
296
500
  6.0.4
297
501
  ---------
@@ -403,7 +607,7 @@ Sidekiq.configure_server do |config|
403
607
  config.log_formatter = Sidekiq::Logger::Formatters::JSON.new
404
608
  end
405
609
  ```
406
- See the [Logging wiki page](https://github.com/mperham/sidekiq/wiki/Logging) for more details.
610
+ See the [Logging wiki page](https://github.com/sidekiq/sidekiq/wiki/Logging) for more details.
407
611
  - **BREAKING CHANGE** Validate proper usage of the `REDIS_PROVIDER`
408
612
  variable. This variable is meant to hold the name of the environment
409
613
  variable which contains your Redis URL, so that you can switch Redis
@@ -595,7 +799,7 @@ Sidekiq::Middleware::Server::Logging -> Sidekiq::JobLogger
595
799
  - The `SomeWorker.set(options)` API was re-written to avoid thread-local state. [#2152]
596
800
  - Sidekiq Enterprise's encrypted jobs now display "[encrypted data]" in the Web UI instead
597
801
  of random hex bytes.
598
- - Please see the [5.0 Upgrade notes](5.0-Upgrade.md) for more detail.
802
+ - Please see the [5.0 Upgrade notes](docs/5.0-Upgrade.md) for more detail.
599
803
 
600
804
  4.2.10
601
805
  -----------
@@ -813,7 +1017,7 @@ Sidekiq::Queues.clear_all
813
1017
  - Sidekiq's internals have been completely overhauled for performance
814
1018
  and to remove dependencies. This has resulted in major speedups, as
815
1019
  [detailed on my blog](http://www.mikeperham.com/2015/10/14/optimizing-sidekiq/).
816
- - See the [4.0 upgrade notes](4.0-Upgrade.md) for more detail.
1020
+ - See the [4.0 upgrade notes](docs/4.0-Upgrade.md) for more detail.
817
1021
 
818
1022
  3.5.4
819
1023
  -----------
@@ -850,7 +1054,7 @@ Sidekiq::Queues.clear_all
850
1054
  - **FIX MEMORY LEAK** Under rare conditions, threads may leak [#2598, gazay]
851
1055
  - Add Ukrainian locale [#2561, elrakita]
852
1056
  - Disconnect and retry Redis operations if we see a READONLY error [#2550]
853
- - Add server middleware testing harness; see [wiki](https://github.com/mperham/sidekiq/wiki/Testing#testing-server-middleware) [#2534, ryansch]
1057
+ - Add server middleware testing harness; see [wiki](https://github.com/sidekiq/sidekiq/wiki/Testing#testing-server-middleware) [#2534, ryansch]
854
1058
 
855
1059
  3.5.0
856
1060
  -----------
@@ -868,7 +1072,7 @@ Sidekiq::Queues.clear_all
868
1072
  - Fix CSRF vulnerability in Web UI, thanks to Egor Homakov for
869
1073
  reporting. [#2422] If you are running the Web UI as a standalone Rack app,
870
1074
  ensure you have a [session middleware
871
- configured](https://github.com/mperham/sidekiq/wiki/Monitoring#standalone):
1075
+ configured](https://github.com/sidekiq/sidekiq/wiki/Monitoring#standalone):
872
1076
  ```ruby
873
1077
  use Rack::Session::Cookie, :secret => "some unique secret string here"
874
1078
  ```
@@ -1080,7 +1284,7 @@ sidekiq_options :dead => false, :retry => 5
1080
1284
  3.0.0
1081
1285
  -----------
1082
1286
 
1083
- Please see [3.0-Upgrade.md](3.0-Upgrade.md) for more comprehensive upgrade notes.
1287
+ Please see [3.0-Upgrade.md](docs/3.0-Upgrade.md) for more comprehensive upgrade notes.
1084
1288
 
1085
1289
  - **Dead Job Queue** - jobs which run out of retries are now moved to a dead
1086
1290
  job queue. These jobs must be retried manually or they will expire
@@ -1124,7 +1328,7 @@ Sidekiq::Client.via(ConnectionPool.new { Redis.new }) do
1124
1328
  end
1125
1329
  ```
1126
1330
  **Sharding support does require a breaking change to client-side
1127
- middleware, see 3.0-Upgrade.md.**
1331
+ middleware, see docs/3.0-Upgrade.md.**
1128
1332
  - New Chinese, Greek, Swedish and Czech translations for the Web UI.
1129
1333
  - Updated most languages translations for the new UI features.
1130
1334
  - **Remove official Capistrano integration** - this integration has been
@@ -1252,7 +1456,7 @@ middleware, see 3.0-Upgrade.md.**
1252
1456
  appear to be doing any work. [#1194]
1253
1457
  - Sidekiq's testing behavior is now dynamic. You can choose between
1254
1458
  `inline` and `fake` behavior in your tests. See
1255
- [Testing](https://github.com/mperham/sidekiq/wiki/Testing) for detail. [#1193]
1459
+ [Testing](https://github.com/sidekiq/sidekiq/wiki/Testing) for detail. [#1193]
1256
1460
  - The Retries table has a new column for the error message.
1257
1461
  - The Web UI topbar now contains the status and live poll button.
1258
1462
  - 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/mperham/sidekiq/workflows/CI/badge.svg)
5
+ ![Build](https://github.com/sidekiq/sidekiq/workflows/CI/badge.svg)
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: 4.0+
31
- - Ruby: MRI 2.5+ or JRuby 9.2+.
32
-
33
- Sidekiq 6.0 supports Rails 5.0+ but does not require it.
17
+ - Redis: Redis 6.2+ or Dragonfly 1.13+
18
+ - Ruby: MRI 2.7+ or JRuby 9.3+.
34
19
 
20
+ Sidekiq 7.0 supports Rails 6.0+ but does not require it.
21
+ As of 7.2, Sidekiq supports Dragonfly as an alternative to Redis for data storage.
35
22
 
36
23
  Installation
37
24
  -----------------
@@ -42,57 +29,78 @@ Installation
42
29
  Getting Started
43
30
  -----------------
44
31
 
45
- See the [Getting Started wiki page](https://github.com/mperham/sidekiq/wiki/Getting-Started) and follow the simple setup process.
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/mperham/sidekiq/raw/main/examples/web-ui.png)
36
+ ![Web UI](https://github.com/sidekiq/sidekiq/raw/main/examples/web-ui.png)
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.
50
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.** A community is best served when discussions are held in public.
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/mperham/sidekiq/wiki/FAQ) and [Troubleshooting](https://github.com/mperham/sidekiq/wiki/Problems-and-Troubleshooting) wiki pages.
70
- Searching the [issues](https://github.com/mperham/sidekiq/issues) for your problem is also a good idea.
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. You can purchase at https://sidekiq.org; email support@contribsys.com for help.
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/mperham/sidekiq/wiki).
77
- * Occasional announcements are made to the [@sidekiq](https://twitter.com/sidekiq) Twitter account.
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 &amp; A.
79
88
 
80
- Every Friday morning is Sidekiq happy hour: I video chat and answer questions.
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/mperham/sidekiq/blob/main/.github/contributing.md).
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/mperham/sidekiq/blob/main/LICENSE) for licensing details.
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://twitter.com/getajobmike) / [@sidekiq](https://twitter.com/sidekiq), [https://www.mikeperham.com](https://www.mikeperham.com) / [https://www.contribsys.com](https://www.contribsys.com)
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)