sidekiq 4.2.2 → 6.3.1

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.

Files changed (138) hide show
  1. checksums.yaml +5 -5
  2. data/Changes.md +516 -0
  3. data/LICENSE +2 -2
  4. data/README.md +23 -36
  5. data/bin/sidekiq +26 -2
  6. data/bin/sidekiqload +28 -38
  7. data/bin/sidekiqmon +8 -0
  8. data/lib/generators/sidekiq/templates/worker_spec.rb.erb +1 -1
  9. data/lib/generators/sidekiq/templates/worker_test.rb.erb +2 -2
  10. data/lib/generators/sidekiq/worker_generator.rb +21 -13
  11. data/lib/sidekiq/api.rb +401 -243
  12. data/lib/sidekiq/cli.rb +228 -212
  13. data/lib/sidekiq/client.rb +76 -53
  14. data/lib/sidekiq/delay.rb +41 -0
  15. data/lib/sidekiq/exception_handler.rb +12 -16
  16. data/lib/sidekiq/extensions/action_mailer.rb +13 -22
  17. data/lib/sidekiq/extensions/active_record.rb +13 -10
  18. data/lib/sidekiq/extensions/class_methods.rb +14 -11
  19. data/lib/sidekiq/extensions/generic_proxy.rb +12 -4
  20. data/lib/sidekiq/fetch.rb +39 -31
  21. data/lib/sidekiq/job.rb +13 -0
  22. data/lib/sidekiq/job_logger.rb +63 -0
  23. data/lib/sidekiq/job_retry.rb +259 -0
  24. data/lib/sidekiq/launcher.rb +170 -71
  25. data/lib/sidekiq/logger.rb +166 -0
  26. data/lib/sidekiq/manager.rb +17 -20
  27. data/lib/sidekiq/middleware/chain.rb +20 -8
  28. data/lib/sidekiq/middleware/current_attributes.rb +52 -0
  29. data/lib/sidekiq/middleware/i18n.rb +5 -7
  30. data/lib/sidekiq/monitor.rb +133 -0
  31. data/lib/sidekiq/paginator.rb +18 -14
  32. data/lib/sidekiq/processor.rb +169 -78
  33. data/lib/sidekiq/rails.rb +41 -36
  34. data/lib/sidekiq/redis_connection.rb +65 -20
  35. data/lib/sidekiq/scheduled.rb +85 -34
  36. data/lib/sidekiq/sd_notify.rb +149 -0
  37. data/lib/sidekiq/systemd.rb +24 -0
  38. data/lib/sidekiq/testing/inline.rb +2 -1
  39. data/lib/sidekiq/testing.rb +52 -26
  40. data/lib/sidekiq/util.rb +48 -15
  41. data/lib/sidekiq/version.rb +2 -1
  42. data/lib/sidekiq/web/action.rb +15 -17
  43. data/lib/sidekiq/web/application.rb +114 -92
  44. data/lib/sidekiq/web/csrf_protection.rb +180 -0
  45. data/lib/sidekiq/web/helpers.rb +151 -83
  46. data/lib/sidekiq/web/router.rb +27 -19
  47. data/lib/sidekiq/web.rb +85 -76
  48. data/lib/sidekiq/worker.rb +233 -43
  49. data/lib/sidekiq.rb +88 -64
  50. data/sidekiq.gemspec +24 -22
  51. data/web/assets/images/apple-touch-icon.png +0 -0
  52. data/web/assets/javascripts/application.js +86 -59
  53. data/web/assets/javascripts/dashboard.js +81 -85
  54. data/web/assets/stylesheets/application-dark.css +147 -0
  55. data/web/assets/stylesheets/application-rtl.css +242 -0
  56. data/web/assets/stylesheets/application.css +319 -141
  57. data/web/assets/stylesheets/bootstrap-rtl.min.css +9 -0
  58. data/web/assets/stylesheets/bootstrap.css +2 -2
  59. data/web/locales/ar.yml +87 -0
  60. data/web/locales/de.yml +14 -2
  61. data/web/locales/en.yml +8 -1
  62. data/web/locales/es.yml +22 -5
  63. data/web/locales/fa.yml +80 -0
  64. data/web/locales/fr.yml +10 -3
  65. data/web/locales/he.yml +79 -0
  66. data/web/locales/ja.yml +12 -4
  67. data/web/locales/lt.yml +83 -0
  68. data/web/locales/pl.yml +4 -4
  69. data/web/locales/ru.yml +4 -0
  70. data/web/locales/ur.yml +80 -0
  71. data/web/locales/vi.yml +83 -0
  72. data/web/views/_footer.erb +5 -2
  73. data/web/views/_job_info.erb +4 -3
  74. data/web/views/_nav.erb +4 -18
  75. data/web/views/_paging.erb +1 -1
  76. data/web/views/_poll_link.erb +2 -5
  77. data/web/views/_summary.erb +7 -7
  78. data/web/views/busy.erb +60 -22
  79. data/web/views/dashboard.erb +23 -15
  80. data/web/views/dead.erb +3 -3
  81. data/web/views/layout.erb +14 -3
  82. data/web/views/morgue.erb +19 -12
  83. data/web/views/queue.erb +24 -14
  84. data/web/views/queues.erb +14 -4
  85. data/web/views/retries.erb +22 -13
  86. data/web/views/retry.erb +4 -4
  87. data/web/views/scheduled.erb +7 -4
  88. metadata +44 -194
  89. data/.github/contributing.md +0 -32
  90. data/.github/issue_template.md +0 -4
  91. data/.gitignore +0 -12
  92. data/.travis.yml +0 -12
  93. data/3.0-Upgrade.md +0 -70
  94. data/4.0-Upgrade.md +0 -53
  95. data/COMM-LICENSE +0 -95
  96. data/Ent-Changes.md +0 -146
  97. data/Gemfile +0 -29
  98. data/Pro-2.0-Upgrade.md +0 -138
  99. data/Pro-3.0-Upgrade.md +0 -44
  100. data/Pro-Changes.md +0 -570
  101. data/Rakefile +0 -9
  102. data/bin/sidekiqctl +0 -99
  103. data/code_of_conduct.md +0 -50
  104. data/lib/sidekiq/core_ext.rb +0 -106
  105. data/lib/sidekiq/logging.rb +0 -106
  106. data/lib/sidekiq/middleware/server/active_record.rb +0 -13
  107. data/lib/sidekiq/middleware/server/logging.rb +0 -40
  108. data/lib/sidekiq/middleware/server/retry_jobs.rb +0 -205
  109. data/test/config.yml +0 -9
  110. data/test/env_based_config.yml +0 -11
  111. data/test/fake_env.rb +0 -1
  112. data/test/fixtures/en.yml +0 -2
  113. data/test/helper.rb +0 -75
  114. data/test/test_actors.rb +0 -138
  115. data/test/test_api.rb +0 -528
  116. data/test/test_cli.rb +0 -418
  117. data/test/test_client.rb +0 -266
  118. data/test/test_exception_handler.rb +0 -56
  119. data/test/test_extensions.rb +0 -127
  120. data/test/test_fetch.rb +0 -50
  121. data/test/test_launcher.rb +0 -95
  122. data/test/test_logging.rb +0 -35
  123. data/test/test_manager.rb +0 -50
  124. data/test/test_middleware.rb +0 -158
  125. data/test/test_processor.rb +0 -201
  126. data/test/test_rails.rb +0 -22
  127. data/test/test_redis_connection.rb +0 -132
  128. data/test/test_retry.rb +0 -326
  129. data/test/test_retry_exhausted.rb +0 -149
  130. data/test/test_scheduled.rb +0 -115
  131. data/test/test_scheduling.rb +0 -50
  132. data/test/test_sidekiq.rb +0 -107
  133. data/test/test_testing.rb +0 -143
  134. data/test/test_testing_fake.rb +0 -357
  135. data/test/test_testing_inline.rb +0 -94
  136. data/test/test_util.rb +0 -13
  137. data/test/test_web.rb +0 -666
  138. data/test/test_web_helpers.rb +0 -54
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 16084a1269ac7fe480effaf07d9f6b360685e50d
4
- data.tar.gz: cdf1982622b75f401b982418bea515eb1c729bea
2
+ SHA256:
3
+ metadata.gz: 33cb573c76378ff933909bdc009358cc94b81e9e50c17b6dd8160170fe744f25
4
+ data.tar.gz: f13c16da01f5cc0ef9514396aed899c8e1f69049d2d425892d3f5e774d68c6a7
5
5
  SHA512:
6
- metadata.gz: 22858e281ef82252dac1c31b11ddd9841fc280dd4321f7a8def5b2b9911c3c1c0afa0501b113646f516736b314aae9a425a242111db205fd3d504a9ef9e49a65
7
- data.tar.gz: 77a536da34d30a5327314ee8391b22d8eb7867d6c866c3f6a958c644644844e2884b4ec00982f5ece04dfa020f4135b197766dd512fd68724be2dc27e1ead390
6
+ metadata.gz: 9829304cbe0810266d2a320b14386561a4f22965aa3f9fab311253c1edd9f3075298dadba28afc0f69f898ed69d858833e744e52db1012a0d23037ecbdf33ce3
7
+ data.tar.gz: b38f253759ab7e3479829faad0e60e42ad2a6281b4dc022c66b0af652c53e85e5d7362bc07ecf02ae3ae3c530e3619572ad070267d2690aa5b4fafc08762d73e
data/Changes.md CHANGED
@@ -1,5 +1,521 @@
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)
4
+
5
+ 6.3.1
6
+ ---------
7
+
8
+ - Fix keyword arguments error with CurrentAttributes on Ruby 3.0 [#5048]
9
+
10
+ 6.3.0
11
+ ---------
12
+
13
+ - **BREAK**: The Web UI has been refactored to remove jQuery. Any UI extensions
14
+ which use jQuery will break.
15
+ - **FEATURE**: Sidekiq.logger has been enhanced so any `Rails.logger`
16
+ output in jobs now shows up in the Sidekiq console. Remove any logger
17
+ hacks in your initializer and see if it Just Works™ now. [#5021]
18
+ - **FEATURE**: Add `Sidekiq::Job` alias for `Sidekiq::Worker`, to better
19
+ reflect industry standard terminology. You can now do this:
20
+ ```ruby
21
+ class MyJob
22
+ include Sidekiq::Job
23
+ sidekiq_options ...
24
+ def perform(args)
25
+ end
26
+ end
27
+ ```
28
+ - **FEATURE**: Support for serializing ActiveSupport::CurrentAttributes into each job. [#4982]
29
+ ```ruby
30
+ # config/initializers/sidekiq.rb
31
+ require "sidekiq/middleware/current_attributes"
32
+ Sidekiq::CurrentAttributes.persist(Myapp::Current) # Your AS::CurrentAttributes singleton
33
+ ```
34
+ - **FEATURE**: Add `Sidekiq::Worker.perform_bulk` for enqueuing jobs in bulk,
35
+ similar to `Sidekiq::Client.push_bulk` [#5042]
36
+ ```ruby
37
+ MyJob.perform_bulk([[1], [2], [3]])
38
+ ```
39
+ - Implement `queue_as`, `wait` and `wait_until` for ActiveJob compatibility [#5003]
40
+ - Scheduler now uses Lua to reduce Redis load and network roundtrips [#5044]
41
+ - Retry Redis operation if we get an `UNBLOCKED` Redis error [#4985]
42
+ - Run existing signal traps, if any, before running Sidekiq's trap [#4991]
43
+ - Fix fetch bug when using weighted queues which caused Sidekiq to stop
44
+ processing queues randomly [#5031]
45
+
46
+ 6.2.2
47
+ ---------
48
+
49
+ - Reduce retry jitter, add jitter to `sidekiq_retry_in` values [#4957]
50
+ - Minimize scheduler load on Redis at scale [#4882]
51
+ - Improve logging of delay jobs [#4904, BuonOno]
52
+ - Minor CSS improvements for buttons and tables, design PRs always welcome!
53
+ - Tweak Web UI `Cache-Control` header [#4966]
54
+ - Rename internal API class `Sidekiq::Job` to `Sidekiq::JobRecord` [#4955]
55
+
56
+ 6.2.1
57
+ ---------
58
+
59
+ - Update RTT warning logic to handle transient RTT spikes [#4851]
60
+ - Fix very low priority CVE on unescaped queue name [#4852]
61
+ - Add note about sessions and Rails apps in API mode
62
+
63
+ 6.2.0
64
+ ---------
65
+
66
+ - Store Redis RTT and log if poor [#4824]
67
+ - Add process/thread stats to Busy page [#4806]
68
+ - Improve Web UI on mobile devices [#4840]
69
+ - **Refactor Web UI session usage** [#4804]
70
+ Numerous people have hit "Forbidden" errors and struggled with Sidekiq's
71
+ Web UI session requirement. If you have code in your initializer for
72
+ Web sessions, it's quite possible it will need to be removed. Here's
73
+ an overview:
74
+ ```
75
+ Sidekiq::Web needs a valid Rack session for CSRF protection. If this is a Rails app,
76
+ make sure you mount Sidekiq::Web *inside* your routes in `config/routes.rb` so
77
+ Sidekiq can reuse the Rails session:
78
+
79
+ Rails.application.routes.draw do
80
+ mount Sidekiq::Web => "/sidekiq"
81
+ ....
82
+ end
83
+
84
+ If this is a bare Rack app, use a session middleware before Sidekiq::Web:
85
+
86
+ # first, use IRB to create a shared secret key for sessions and commit it
87
+ require 'securerandom'; File.open(".session.key", "w") {|f| f.write(SecureRandom.hex(32)) }
88
+
89
+ # now, update your Rack app to include the secret with a session cookie middleware
90
+ use Rack::Session::Cookie, secret: File.read(".session.key"), same_site: true, max_age: 86400
91
+ run Sidekiq::Web
92
+
93
+ If this is a Rails app in API mode, you need to enable sessions.
94
+
95
+ https://guides.rubyonrails.org/api_app.html#using-session-middlewares
96
+ ```
97
+
98
+ 6.1.3
99
+ ---------
100
+
101
+ - Warn if Redis is configured to evict data under memory pressure [#4752]
102
+ - Add process RSS on the Busy page [#4717]
103
+
104
+ 6.1.2
105
+ ---------
106
+
107
+ - Improve readability in dark mode Web UI [#4674]
108
+ - Fix Web UI crash with corrupt session [#4672]
109
+ - Allow middleware to yield arguments [#4673, @eugeneius]
110
+ - Migrate CI from CircleCI to GitHub Actions [#4677]
111
+
112
+ 6.1.1
113
+ ---------
114
+
115
+ - Jobs are now sorted by age in the Busy Workers table. [#4641]
116
+ - Fix "check all" JS logic in Web UI [#4619]
117
+
118
+ 6.1.0
119
+ ---------
120
+
121
+ - Web UI - Dark Mode fixes [#4543, natematykiewicz]
122
+ - Ensure `Rack::ContentLength` is loaded as middleware for correct Web UI responses [#4541]
123
+ - Avoid exception dumping SSL store in Redis connection logging [#4532]
124
+ - Better error messages in Sidekiq::Client [#4549]
125
+ - Remove rack-protection, reimplement CSRF protection [#4588]
126
+ - Require redis-rb 4.2 [#4591]
127
+ - Update to jquery 1.12.4 [#4593]
128
+ - Refactor internal fetch logic and API [#4602]
129
+
130
+ 6.0.7
131
+ ---------
132
+
133
+ - Refactor systemd integration to work better with custom binaries [#4511]
134
+ - Don't connect to Redis at process exit if not needed [#4502]
135
+ - Remove Redis connection naming [#4479]
136
+ - Fix Redis Sentinel password redaction [#4499]
137
+ - Add Vietnamese locale (vi) [#4528]
138
+
139
+ 6.0.6
140
+ ---------
141
+
142
+ - **Integrate with systemd's watchdog and notification features** [#4488]
143
+ Set `Type=notify` in [sidekiq.service](https://github.com/mperham/sidekiq/blob/4b8a8bd3ae42f6e48ae1fdaf95ed7d7af18ed8bb/examples/systemd/sidekiq.service#L30-L39). The integration works automatically.
144
+ - Use `setTimeout` rather than `setInterval` to avoid thundering herd [#4480]
145
+ - Fix edge case where a job can be pushed without a queue.
146
+ - Flush job stats at exit [#4498]
147
+ - Check RAILS_ENV before RACK_ENV [#4493]
148
+ - Add Lithuanian locale [#4476]
149
+
150
+ 6.0.5
151
+ ---------
152
+
153
+ - Fix broken Web UI response when using NewRelic and Rack 2.1.2+. [#4440]
154
+ - Update APIs to use `UNLINK`, not `DEL`. [#4449]
155
+ - Fix Ruby 2.7 warnings [#4412]
156
+ - Add support for `APP_ENV` [[95fa5d9]](https://github.com/mperham/sidekiq/commit/95fa5d90192148026e52ca2902f1b83c70858ce8)
157
+
158
+ 6.0.4
159
+ ---------
160
+
161
+ - Fix ActiveJob's `sidekiq_options` integration [#4404]
162
+ - Sidekiq Pro users will now see a Pause button next to each queue in
163
+ the Web UI, allowing them to pause queues manually [#4374, shayonj]
164
+ - Fix Sidekiq::Workers API unintentional change in 6.0.2 [#4387]
165
+
166
+
167
+ 6.0.3
168
+ ---------
169
+
170
+ - Fix `Sidekiq::Client.push_bulk` API which was erroneously putting
171
+ invalid `at` values in the job payloads [#4321]
172
+
173
+ 6.0.2
174
+ ---------
175
+
176
+ - Fix Sidekiq Enterprise's rolling restart functionality, broken by refactoring in 6.0.0. [#4334]
177
+ - More internal refactoring and performance tuning [fatkodima]
178
+
179
+ 6.0.1
180
+ ---------
181
+
182
+ - **Performance tuning**, Sidekiq should be 10-15% faster now [#4303, 4299,
183
+ 4269, fatkodima]
184
+ - **Dark Mode support in Web UI** (further design polish welcome!) [#4227, mperham,
185
+ fatkodima, silent-e]
186
+ - **Job-specific log levels**, allowing you to turn on debugging for
187
+ problematic workers. [fatkodima, #4287]
188
+ ```ruby
189
+ MyWorker.set(log_level: :debug).perform_async(...)
190
+ ```
191
+ - **Ad-hoc job tags**. You can tag your jobs with, e.g, subdomain, tenant, country,
192
+ locale, application, version, user/client, "alpha/beta/pro/ent", types of jobs,
193
+ teams/people responsible for jobs, additional metadata, etc.
194
+ Tags are shown on different pages with job listings. Sidekiq Pro users
195
+ can filter based on them [fatkodima, #4280]
196
+ ```ruby
197
+ class MyWorker
198
+ include Sidekiq::Worker
199
+ sidekiq_options tags: ['bank-ops', 'alpha']
200
+ ...
201
+ end
202
+ ```
203
+ - Fetch scheduled jobs in batches before pushing into specific queues.
204
+ This will decrease enqueueing time of scheduled jobs by a third. [fatkodima, #4273]
205
+ ```
206
+ ScheduledSet with 10,000 jobs
207
+ Before: 56.6 seconds
208
+ After: 39.2 seconds
209
+ ```
210
+ - Compress error backtraces before pushing into Redis, if you are
211
+ storing error backtraces, this will halve the size of your RetrySet
212
+ in Redis [fatkodima, #4272]
213
+ ```
214
+ RetrySet with 100,000 jobs
215
+ Before: 261 MB
216
+ After: 129 MB
217
+ ```
218
+ - Support display of ActiveJob 6.0 payloads in the Web UI [#4263]
219
+ - Add `SortedSet#scan` for pattern based scanning. For large sets this API will be **MUCH** faster
220
+ than standard iteration using each. [fatkodima, #4262]
221
+ ```ruby
222
+ Sidekiq::DeadSet.new.scan("UnreliableApi") do |job|
223
+ job.retry
224
+ end
225
+ ```
226
+ - Dramatically speed up SortedSet#find\_job(jid) by using Redis's ZSCAN
227
+ support, approx 10x faster. [fatkodima, #4259]
228
+ ```
229
+ zscan 0.179366 0.047727 0.227093 ( 1.161376)
230
+ enum 8.522311 0.419826 8.942137 ( 9.785079)
231
+ ```
232
+ - Respect rails' generators `test_framework` option and gracefully handle extra `worker` suffix on generator [fatkodima, #4256]
233
+ - Add ability to sort 'Enqueued' page on Web UI by position in the queue [fatkodima, #4248]
234
+ - Support `Client.push_bulk` with different delays [fatkodima, #4243]
235
+ ```ruby
236
+ Sidekiq::Client.push_bulk("class" => FooJob, "args" => [[1], [2]], "at" => [1.minute.from_now.to_f, 5.minutes.from_now.to_f])
237
+ ```
238
+ - Easier way to test enqueuing specific ActionMailer and ActiveRecord delayed jobs. Instead of manually
239
+ parsing embedded class, you can now test by fetching jobs for specific classes. [fatkodima, #4292]
240
+ ```ruby
241
+ assert_equal 1, Sidekiq::Extensions::DelayedMailer.jobs_for(FooMailer).size
242
+ ```
243
+ - Add `sidekiqmon` to gemspec executables [#4242]
244
+ - Gracefully handle `Sidekiq.logger = nil` [#4240]
245
+ - Inject Sidekiq::LogContext module if user-supplied logger does not include it [#4239]
246
+
247
+ 6.0
248
+ ---------
249
+
250
+ This release has major breaking changes. Read and test carefully in production.
251
+
252
+ - With Rails 6.0.2+, ActiveJobs can now use `sidekiq_options` directly to configure Sidekiq
253
+ features/internals like the retry subsystem. [#4213, pirj]
254
+ ```ruby
255
+ class MyJob < ActiveJob::Base
256
+ queue_as :myqueue
257
+ sidekiq_options retry: 10, backtrace: 20
258
+ def perform(...)
259
+ end
260
+ end
261
+ ```
262
+ - Logging has been redesigned to allow for pluggable log formatters:
263
+ ```ruby
264
+ Sidekiq.configure_server do |config|
265
+ config.log_formatter = Sidekiq::Logger::Formatters::JSON.new
266
+ end
267
+ ```
268
+ See the [Logging wiki page](https://github.com/mperham/sidekiq/wiki/Logging) for more details.
269
+ - **BREAKING CHANGE** Validate proper usage of the `REDIS_PROVIDER`
270
+ variable. This variable is meant to hold the name of the environment
271
+ variable which contains your Redis URL, so that you can switch Redis
272
+ providers quickly and easily with a single variable change. It is not
273
+ meant to hold the actual Redis URL itself. If you want to manually set
274
+ the Redis URL (not recommended as it implies you have no failover),
275
+ then you may set `REDIS_URL` directly. [#3969]
276
+ - **BREAKING CHANGE** Increase default shutdown timeout from 8 seconds
277
+ to 25 seconds. Both Heroku and ECS now use 30 second shutdown timeout
278
+ by default and we want Sidekiq to take advantage of this time. If you
279
+ have deployment scripts which depend on the old default timeout, use `-t 8` to
280
+ get the old behavior. [#3968]
281
+ - **BREAKING CHANGE** Remove the daemonization, logfile and pidfile
282
+ arguments to Sidekiq. Use a proper process supervisor (e.g. systemd or
283
+ foreman) to manage Sidekiq. See the Deployment wiki page for links to
284
+ more resources.
285
+ - Integrate the StandardRB code formatter to ensure consistent code
286
+ styling. [#4114, gearnode]
287
+
288
+ 5.2.9
289
+ ---------
290
+
291
+ - Release Rack lock due to a cascade of CVEs. [#4566]
292
+ Pro-tip: don't lock Rack.
293
+
294
+ 5.2.8
295
+ ---------
296
+
297
+ - Lock to Rack 2.0.x to prevent future incompatibilities
298
+ - Fix invalid reference in `sidekiqctl`
299
+
300
+ 5.2.7
301
+ ---------
302
+
303
+ - Fix stale `enqueued_at` when retrying [#4149]
304
+ - Move build to [Circle CI](https://circleci.com/gh/mperham/sidekiq) [#4120]
305
+
306
+ 5.2.6
307
+ ---------
308
+
309
+ - Fix edge case where a job failure during Redis outage could result in a lost job [#4141]
310
+ - Better handling of malformed job arguments in payload [#4095]
311
+ - Restore bootstap's dropdown css component [#4099, urkle]
312
+ - Display human-friendly time diff for longer queue latencies [#4111, interlinked]
313
+ - Allow `Sidekiq::Worker#set` to be chained
314
+
315
+ 5.2.5
316
+ ---------
317
+
318
+ - Fix default usage of `config/sidekiq.yml` [#4077, Tensho]
319
+
320
+ 5.2.4
321
+ ---------
322
+
323
+ - Add warnings for various deprecations and changes coming in Sidekiq 6.0.
324
+ See the 6-0 branch. [#4056]
325
+ - Various improvements to the Sidekiq test suite and coverage [#4026, #4039, Tensho]
326
+
327
+ 5.2.3
328
+ ---------
329
+
330
+ - Warning message on invalid REDIS\_PROVIDER [#3970]
331
+ - Add `sidekiqctl status` command [#4003, dzunk]
332
+ - Update elapsed time calculatons to use monotonic clock [#3999]
333
+ - Fix a few issues with mobile Web UI styling [#3973, navied]
334
+ - Jobs with `retry: false` now go through the global `death_handlers`,
335
+ meaning you can take action on failed ephemeral jobs. [#3980, Benjamin-Dobell]
336
+ - Fix race condition in defining Workers. [#3997, mattbooks]
337
+
338
+ 5.2.2
339
+ ---------
340
+
341
+ - Raise error for duplicate queue names in config to avoid unexpected fetch algorithm change [#3911]
342
+ - Fix concurrency bug on JRuby [#3958, mattbooks]
343
+ - Add "Kill All" button to the retries page [#3938]
344
+
345
+ 5.2.1
346
+ -----------
347
+
348
+ - Fix concurrent modification error during heartbeat [#3921]
349
+
350
+ 5.2.0
351
+ -----------
352
+
353
+ - **Decrease default concurrency from 25 to 10** [#3892]
354
+ - Verify connection pool sizing upon startup [#3917]
355
+ - Smoother scheduling for large Sidekiq clusters [#3889]
356
+ - Switch Sidekiq::Testing impl from alias\_method to Module#prepend, for resiliency [#3852]
357
+ - Update Sidekiq APIs to use SCAN for scalability [#3848, ffiller]
358
+ - Remove concurrent-ruby gem dependency [#3830]
359
+ - Optimize Web UI's bootstrap.css [#3914]
360
+
361
+ 5.1.3
362
+ -----------
363
+
364
+ - Fix version comparison so Ruby 2.2.10 works. [#3808, nateberkopec]
365
+
366
+ 5.1.2
367
+ -----------
368
+
369
+ - Add link to docs in Web UI footer
370
+ - Fix crash on Ctrl-C in Windows [#3775, Bernica]
371
+ - Remove `freeze` calls on String constants. This is superfluous with Ruby
372
+ 2.3+ and `frozen_string_literal: true`. [#3759]
373
+ - Fix use of AR middleware outside of Rails [#3787]
374
+ - Sidekiq::Worker `sidekiq_retry_in` block can now return nil or 0 to use
375
+ the default backoff delay [#3796, dsalahutdinov]
376
+
377
+ 5.1.1
378
+ -----------
379
+
380
+ - Fix Web UI incompatibility with Redis 3.x gem [#3749]
381
+
382
+ 5.1.0
383
+ -----------
384
+
385
+ - **NEW** Global death handlers - called when your job exhausts all
386
+ retries and dies. Now you can take action when a job fails permanently. [#3721]
387
+ - **NEW** Enable ActiveRecord query cache within jobs by default [#3718, sobrinho]
388
+ This will prevent duplicate SELECTS; cache is cleared upon any UPDATE/INSERT/DELETE.
389
+ See the issue for how to bypass the cache or disable it completely.
390
+ - Scheduler timing is now more accurate, 15 -> 5 seconds [#3734]
391
+ - Exceptions during the :startup event will now kill the process [#3717]
392
+ - Make `Sidekiq::Client.via` reentrant [#3715]
393
+ - Fix use of Sidekiq logger outside of the server process [#3714]
394
+ - Tweak `constantize` to better match Rails class lookup. [#3701, caffeinated-tech]
395
+
396
+ 5.0.5
397
+ -----------
398
+
399
+ - Update gemspec to allow newer versions of the Redis gem [#3617]
400
+ - Refactor Worker.set so it can be memoized [#3602]
401
+ - Fix display of Redis URL in web footer, broken in 5.0.3 [#3560]
402
+ - Update `Sidekiq::Job#display_args` to avoid mutation [#3621]
403
+
404
+ 5.0.4
405
+ -----------
406
+
407
+ - Fix "slow startup" performance regression from 5.0.2. [#3525]
408
+ - Allow users to disable ID generation since some redis providers disable the CLIENT command. [#3521]
409
+
410
+ 5.0.3
411
+ -----------
412
+
413
+ - Fix overriding `class_attribute` core extension from ActiveSupport with Sidekiq one [PikachuEXE, #3499]
414
+ - Allow job logger to be overridden [AlfonsoUceda, #3502]
415
+ - Set a default Redis client identifier for debugging [#3516]
416
+ - Fix "Uninitialized constant" errors on startup with the delayed extensions [#3509]
417
+
418
+ 5.0.2
419
+ -----------
420
+
421
+ - fix broken release, thanks @nateberkopec
422
+
423
+ 5.0.1
424
+ -----------
425
+
426
+ - Fix incorrect server identity when daemonizing [jwilm, #3496]
427
+ - Work around error running Web UI against Redis Cluster [#3492]
428
+ - Remove core extensions, Sidekiq is now monkeypatch-free! [#3474]
429
+ - Reimplement Web UI's HTTP\_ACCEPT\_LANGUAGE parsing because the spec is utterly
430
+ incomprehensible for various edge cases. [johanlunds, natematykiewicz, #3449]
431
+ - Update `class_attribute` core extension to avoid warnings
432
+ - Expose `job_hash_context` from `Sidekiq::Logging` to support log customization
433
+
434
+ 5.0.0
435
+ -----------
436
+
437
+ - **BREAKING CHANGE** Job dispatch was refactored for safer integration with
438
+ Rails 5. The **Logging** and **RetryJobs** server middleware were removed and
439
+ functionality integrated directly into Sidekiq::Processor. These aren't
440
+ commonly used public APIs so this shouldn't impact most users.
441
+ ```
442
+ Sidekiq::Middleware::Server::RetryJobs -> Sidekiq::JobRetry
443
+ Sidekiq::Middleware::Server::Logging -> Sidekiq::JobLogger
444
+ ```
445
+ - Quieting Sidekiq is now done via the TSTP signal, the USR1 signal is deprecated.
446
+ - The `delay` extension APIs are no longer available by default, you
447
+ must opt into them.
448
+ - The Web UI is now BiDi and can render RTL languages like Arabic, Farsi and Hebrew.
449
+ - Rails 3.2 and Ruby 2.0 and 2.1 are no longer supported.
450
+ - The `SomeWorker.set(options)` API was re-written to avoid thread-local state. [#2152]
451
+ - Sidekiq Enterprise's encrypted jobs now display "[encrypted data]" in the Web UI instead
452
+ of random hex bytes.
453
+ - Please see the [5.0 Upgrade notes](5.0-Upgrade.md) for more detail.
454
+
455
+ 4.2.10
456
+ -----------
457
+
458
+ - Scheduled jobs can now be moved directly to the Dead queue via API [#3390]
459
+ - Fix edge case leading to job duplication when using Sidekiq Pro's
460
+ reliability feature [#3388]
461
+ - Fix error class name display on retry page [#3348]
462
+ - More robust latency calculation [#3340]
463
+
464
+ 4.2.9
465
+ -----------
466
+
467
+ - Rollback [#3303] which broke Heroku Redis users [#3311]
468
+ - Add support for TSTP signal, for Sidekiq 5.0 forward compatibility. [#3302]
469
+
470
+ 4.2.8
471
+ -----------
472
+
473
+ - Fix rare edge case with Redis driver that can create duplicate jobs [#3303]
474
+ - Fix Rails 5 loading issue [#3275]
475
+ - Restore missing tooltips to timestamps in Web UI [#3310]
476
+ - Work on **Sidekiq 5.0** is now active! [#3301]
477
+
478
+ 4.2.7
479
+ -----------
480
+
481
+ - Add new integration testing to verify code loading and job execution
482
+ in development and production modes with Rails 4 and 5 [#3241]
483
+ - Fix delayed extensions in development mode [#3227, DarthSim]
484
+ - Use Worker's `retry` default if job payload does not have a retry
485
+ attribute [#3234, mlarraz]
486
+
487
+ 4.2.6
488
+ -----------
489
+
490
+ - Run Rails Executor when in production [#3221, eugeneius]
491
+
492
+ 4.2.5
493
+ -----------
494
+
495
+ - Re-enable eager loading of all code when running non-development Rails 5. [#3203]
496
+ - Better root URL handling for zany web servers [#3207]
497
+
498
+ 4.2.4
499
+ -----------
500
+
501
+ - Log errors coming from the Rails 5 reloader. [#3212, eugeneius]
502
+ - Clone job data so middleware changes don't appear in Busy tab
503
+
504
+ 4.2.3
505
+ -----------
506
+
507
+ - Disable use of Rails 5's Reloader API in non-development modes, it has proven
508
+ to be unstable under load [#3154]
509
+ - Allow disabling of Sidekiq::Web's cookie session to handle the
510
+ case where the app provides a session already [#3180, inkstak]
511
+ ```ruby
512
+ Sidekiq::Web.set :sessions, false
513
+ ```
514
+ - Fix Web UI sharding support broken in 4.2.2. [#3169]
515
+ - Fix timestamps not updating during UI polling [#3193, shaneog]
516
+ - Relax rack-protection version to >= 1.5.0
517
+ - Provide consistent interface to exception handlers, changing the structure of the context hash. [#3161]
518
+
3
519
  4.2.2
4
520
  -----------
5
521
 
data/LICENSE CHANGED
@@ -5,5 +5,5 @@ the LGPLv3 license. Please see <http://www.gnu.org/licenses/lgpl-3.0.html>
5
5
  for license text.
6
6
 
7
7
  Sidekiq Pro has a commercial-friendly license allowing private forks
8
- and modifications of Sidekiq. Please see http://sidekiq.org/pro/ for
9
- more detail. You can find the commercial license terms in COMM-LICENSE.
8
+ and modifications of Sidekiq. Please see https://sidekiq.org/products/pro.html for
9
+ more detail. You can find the commercial license terms in COMM-LICENSE.txt.
data/README.md CHANGED
@@ -2,10 +2,7 @@ Sidekiq
2
2
  ==============
3
3
 
4
4
  [![Gem Version](https://badge.fury.io/rb/sidekiq.svg)](https://rubygems.org/gems/sidekiq)
5
- [![Code Climate](https://codeclimate.com/github/mperham/sidekiq.svg)](https://codeclimate.com/github/mperham/sidekiq)
6
- [![Build Status](https://travis-ci.org/mperham/sidekiq.svg)](https://travis-ci.org/mperham/sidekiq)
7
- [![Gitter Chat](https://badges.gitter.im/mperham/sidekiq.svg)](https://gitter.im/mperham/sidekiq)
8
-
5
+ ![Build](https://github.com/mperham/sidekiq/workflows/CI/badge.svg)
9
6
 
10
7
  Simple, efficient background processing for Ruby.
11
8
 
@@ -13,31 +10,27 @@ Sidekiq uses threads to handle many jobs at the same time in the
13
10
  same process. It does not require Rails but will integrate tightly with
14
11
  Rails to make background processing dead simple.
15
12
 
16
- Sidekiq is compatible with Resque. It uses the exact same
17
- message format as Resque so it can integrate into an existing Resque processing farm.
18
- You can have Sidekiq and Resque run side-by-side at the same time and
19
- use the Resque client to enqueue jobs in Redis to be processed by Sidekiq.
20
-
21
13
  Performance
22
14
  ---------------
23
15
 
24
- Version | Latency | Garbage created for 10,000 jobs | Time to process 100,000 jobs | Throughput
25
- -----------------|------|---------|---------|------------------------
26
- Sidekiq 4.0.0 | 10ms | 151 MB | 22 sec | **4500 jobs/sec**
27
- Sidekiq 3.5.1 | 22ms | 1257 MB | 125 sec | 800 jobs/sec
28
- Resque 1.25.2 | - | - | 420 sec | 240 jobs/sec
29
- DelayedJob 4.1.1 | - | - | 465 sec | 215 jobs/sec
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 |
30
24
 
25
+ This benchmark can be found in `bin/sidekiqload` and assumes a Redis network latency of 1ms.
31
26
 
32
27
  Requirements
33
28
  -----------------
34
29
 
35
- Sidekiq supports CRuby 2.0+ and JRuby 9k.
30
+ - Redis: 4.0+
31
+ - Ruby: MRI 2.5+ or JRuby 9.2+.
36
32
 
37
- All Rails releases >= 3.2 are officially supported.
38
-
39
- Redis 2.8 or greater is required. 3.0.3+ is recommended for large
40
- installations with thousands of worker threads.
33
+ Sidekiq 6.0 supports Rails 5.0+ but does not require it.
41
34
 
42
35
 
43
36
  Installation
@@ -50,9 +43,10 @@ Getting Started
50
43
  -----------------
51
44
 
52
45
  See the [Getting Started wiki page](https://github.com/mperham/sidekiq/wiki/Getting-Started) and follow the simple setup process.
53
- You can watch [Railscast #366](http://railscasts.com/episodes/366-sidekiq) to see Sidekiq in action. If you do everything right, you should see this:
46
+ You can watch [this Youtube playlist](https://www.youtube.com/playlist?list=PLjeHh2LSCFrWGT5uVjUuFKAcrcj5kSai1) to learn all about
47
+ Sidekiq and see its features in action. Here's the Web UI:
54
48
 
55
- ![Web UI](https://github.com/mperham/sidekiq/raw/master/examples/web-ui.png)
49
+ ![Web UI](https://github.com/mperham/sidekiq/raw/main/examples/web-ui.png)
56
50
 
57
51
 
58
52
  Want to Upgrade?
@@ -61,7 +55,7 @@ Want to Upgrade?
61
55
  I also sell Sidekiq Pro and Sidekiq Enterprise, extensions to Sidekiq which provide more
62
56
  features, a commercial-friendly license and allow you to support high
63
57
  quality open source development all at the same time. Please see the
64
- [Sidekiq](http://sidekiq.org/) homepage for more detail.
58
+ [Sidekiq](https://sidekiq.org/) homepage for more detail.
65
59
 
66
60
  Subscribe to the **[quarterly newsletter](https://tinyletter.com/sidekiq)** to stay informed about the latest
67
61
  features and changes to Sidekiq and its bigger siblings.
@@ -75,32 +69,25 @@ Problems?
75
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.
76
70
  Searching the [issues](https://github.com/mperham/sidekiq/issues) for your problem is also a good idea.
77
71
 
72
+ Sidekiq Pro and Sidekiq Enterprise customers get private email support. You can purchase at https://sidekiq.org; email support@contribsys.com for help.
73
+
78
74
  Useful resources:
79
75
 
80
76
  * Product documentation is in the [wiki](https://github.com/mperham/sidekiq/wiki).
81
- * Release announcements are made to the [@sidekiq](https://twitter.com/sidekiq) Twitter account.
82
- * Here's a [Reddit forum](https://reddit.com/r/sidekiq) dedicated to Sidekiq discussion
77
+ * Occasional announcements are made to the [@sidekiq](https://twitter.com/sidekiq) Twitter account.
83
78
  * The [Sidekiq tag](https://stackoverflow.com/questions/tagged/sidekiq) on Stack Overflow has lots of useful Q &amp; A.
84
79
 
85
- **No support via Twitter, 140 characters is not enough.**
86
-
87
80
  Every Friday morning is Sidekiq happy hour: I video chat and answer questions.
88
- See the [Sidekiq support page](http://sidekiq.org/support) for details.
89
-
90
- Thanks
91
- -----------------
92
-
93
- Sidekiq stays fast by using the [JProfiler java profiler](http://www.ej-technologies.com/products/jprofiler/overview.html) to find and fix
94
- performance problems on JRuby. Unfortunately MRI does not have good multithreaded profiling tools.
81
+ See the [Sidekiq support page](https://sidekiq.org/support.html) for details.
95
82
 
96
83
 
97
84
  License
98
85
  -----------------
99
86
 
100
- Please see [LICENSE](https://github.com/mperham/sidekiq/blob/master/LICENSE) for licensing details.
87
+ Please see [LICENSE](https://github.com/mperham/sidekiq/blob/main/LICENSE) for licensing details.
101
88
 
102
89
 
103
90
  Author
104
91
  -----------------
105
92
 
106
- Mike Perham, [@mperham](https://twitter.com/mperham) / [@sidekiq](https://twitter.com/sidekiq), [http://www.mikeperham.com](http://www.mikeperham.com) / [http://www.contribsys.com](http://www.contribsys.com)
93
+ 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)