sidekiq 4.1.4 → 6.5.6

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 (213) hide show
  1. checksums.yaml +5 -5
  2. data/Changes.md +666 -0
  3. data/LICENSE +3 -3
  4. data/README.md +27 -35
  5. data/bin/sidekiq +27 -3
  6. data/bin/sidekiqload +78 -84
  7. data/bin/sidekiqmon +8 -0
  8. data/lib/generators/sidekiq/job_generator.rb +57 -0
  9. data/lib/generators/sidekiq/templates/{worker.rb.erb → job.rb.erb} +2 -2
  10. data/lib/generators/sidekiq/templates/job_spec.rb.erb +6 -0
  11. data/lib/generators/sidekiq/templates/job_test.rb.erb +8 -0
  12. data/lib/sidekiq/api.rb +583 -288
  13. data/lib/sidekiq/cli.rb +255 -218
  14. data/lib/sidekiq/client.rb +86 -83
  15. data/lib/sidekiq/component.rb +65 -0
  16. data/lib/sidekiq/delay.rb +43 -0
  17. data/lib/sidekiq/extensions/action_mailer.rb +13 -22
  18. data/lib/sidekiq/extensions/active_record.rb +13 -10
  19. data/lib/sidekiq/extensions/class_methods.rb +14 -11
  20. data/lib/sidekiq/extensions/generic_proxy.rb +13 -5
  21. data/lib/sidekiq/fetch.rb +50 -40
  22. data/lib/sidekiq/job.rb +13 -0
  23. data/lib/sidekiq/job_logger.rb +51 -0
  24. data/lib/sidekiq/job_retry.rb +282 -0
  25. data/lib/sidekiq/job_util.rb +71 -0
  26. data/lib/sidekiq/launcher.rb +192 -85
  27. data/lib/sidekiq/logger.rb +156 -0
  28. data/lib/sidekiq/manager.rb +44 -45
  29. data/lib/sidekiq/metrics/deploy.rb +47 -0
  30. data/lib/sidekiq/metrics/query.rb +153 -0
  31. data/lib/sidekiq/metrics/shared.rb +94 -0
  32. data/lib/sidekiq/metrics/tracking.rb +134 -0
  33. data/lib/sidekiq/middleware/chain.rb +102 -46
  34. data/lib/sidekiq/middleware/current_attributes.rb +63 -0
  35. data/lib/sidekiq/middleware/i18n.rb +7 -7
  36. data/lib/sidekiq/middleware/modules.rb +21 -0
  37. data/lib/sidekiq/monitor.rb +133 -0
  38. data/lib/sidekiq/paginator.rb +20 -16
  39. data/lib/sidekiq/processor.rb +178 -78
  40. data/lib/sidekiq/rails.rb +56 -27
  41. data/lib/sidekiq/redis_client_adapter.rb +154 -0
  42. data/lib/sidekiq/redis_connection.rb +123 -47
  43. data/lib/sidekiq/ring_buffer.rb +29 -0
  44. data/lib/sidekiq/scheduled.rb +97 -40
  45. data/lib/sidekiq/sd_notify.rb +149 -0
  46. data/lib/sidekiq/systemd.rb +24 -0
  47. data/lib/sidekiq/testing/inline.rb +6 -5
  48. data/lib/sidekiq/testing.rb +83 -56
  49. data/lib/sidekiq/transaction_aware_client.rb +45 -0
  50. data/lib/sidekiq/version.rb +2 -1
  51. data/lib/sidekiq/web/action.rb +93 -0
  52. data/lib/sidekiq/web/application.rb +379 -0
  53. data/lib/sidekiq/web/csrf_protection.rb +180 -0
  54. data/lib/sidekiq/web/helpers.rb +365 -0
  55. data/lib/sidekiq/web/router.rb +104 -0
  56. data/lib/sidekiq/web.rb +108 -213
  57. data/lib/sidekiq/worker.rb +288 -42
  58. data/lib/sidekiq.rb +188 -80
  59. data/sidekiq.gemspec +24 -22
  60. data/web/assets/images/apple-touch-icon.png +0 -0
  61. data/web/assets/images/{status-sd8051fd480.png → status.png} +0 -0
  62. data/web/assets/javascripts/application.js +130 -75
  63. data/web/assets/javascripts/chart.min.js +13 -0
  64. data/web/assets/javascripts/chartjs-plugin-annotation.min.js +7 -0
  65. data/web/assets/javascripts/dashboard.js +70 -91
  66. data/web/assets/javascripts/graph.js +16 -0
  67. data/web/assets/javascripts/metrics.js +262 -0
  68. data/web/assets/stylesheets/application-dark.css +143 -0
  69. data/web/assets/stylesheets/application-rtl.css +242 -0
  70. data/web/assets/stylesheets/application.css +390 -145
  71. data/web/assets/stylesheets/bootstrap-rtl.min.css +9 -0
  72. data/web/assets/stylesheets/bootstrap.css +4 -8
  73. data/web/locales/ar.yml +87 -0
  74. data/web/locales/de.yml +15 -3
  75. data/web/locales/el.yml +43 -19
  76. data/web/locales/en.yml +15 -1
  77. data/web/locales/es.yml +22 -5
  78. data/web/locales/fa.yml +80 -0
  79. data/web/locales/fr.yml +10 -3
  80. data/web/locales/he.yml +79 -0
  81. data/web/locales/ja.yml +12 -4
  82. data/web/locales/lt.yml +83 -0
  83. data/web/locales/pl.yml +4 -4
  84. data/web/locales/pt-br.yml +27 -9
  85. data/web/locales/ru.yml +4 -0
  86. data/web/locales/ur.yml +80 -0
  87. data/web/locales/vi.yml +83 -0
  88. data/web/views/_footer.erb +6 -3
  89. data/web/views/_job_info.erb +4 -3
  90. data/web/views/_nav.erb +5 -19
  91. data/web/views/_paging.erb +1 -1
  92. data/web/views/_poll_link.erb +2 -5
  93. data/web/views/_summary.erb +7 -7
  94. data/web/views/busy.erb +64 -26
  95. data/web/views/dashboard.erb +26 -17
  96. data/web/views/dead.erb +4 -4
  97. data/web/views/layout.erb +15 -5
  98. data/web/views/metrics.erb +69 -0
  99. data/web/views/metrics_for_job.erb +87 -0
  100. data/web/views/morgue.erb +21 -14
  101. data/web/views/queue.erb +28 -14
  102. data/web/views/queues.erb +15 -5
  103. data/web/views/retries.erb +24 -15
  104. data/web/views/retry.erb +5 -5
  105. data/web/views/scheduled.erb +9 -6
  106. data/web/views/scheduled_job_info.erb +1 -1
  107. metadata +73 -256
  108. data/.github/contributing.md +0 -32
  109. data/.github/issue_template.md +0 -4
  110. data/.gitignore +0 -12
  111. data/.travis.yml +0 -18
  112. data/3.0-Upgrade.md +0 -70
  113. data/4.0-Upgrade.md +0 -53
  114. data/COMM-LICENSE +0 -95
  115. data/Ent-Changes.md +0 -123
  116. data/Gemfile +0 -29
  117. data/Pro-2.0-Upgrade.md +0 -138
  118. data/Pro-3.0-Upgrade.md +0 -44
  119. data/Pro-Changes.md +0 -559
  120. data/Rakefile +0 -9
  121. data/bin/sidekiqctl +0 -99
  122. data/code_of_conduct.md +0 -50
  123. data/lib/generators/sidekiq/templates/worker_spec.rb.erb +0 -6
  124. data/lib/generators/sidekiq/templates/worker_test.rb.erb +0 -8
  125. data/lib/generators/sidekiq/worker_generator.rb +0 -49
  126. data/lib/sidekiq/core_ext.rb +0 -106
  127. data/lib/sidekiq/exception_handler.rb +0 -31
  128. data/lib/sidekiq/logging.rb +0 -106
  129. data/lib/sidekiq/middleware/server/active_record.rb +0 -13
  130. data/lib/sidekiq/middleware/server/logging.rb +0 -40
  131. data/lib/sidekiq/middleware/server/retry_jobs.rb +0 -205
  132. data/lib/sidekiq/util.rb +0 -62
  133. data/lib/sidekiq/web_helpers.rb +0 -255
  134. data/test/config.yml +0 -9
  135. data/test/env_based_config.yml +0 -11
  136. data/test/fake_env.rb +0 -1
  137. data/test/fixtures/en.yml +0 -2
  138. data/test/helper.rb +0 -75
  139. data/test/test_actors.rb +0 -138
  140. data/test/test_api.rb +0 -528
  141. data/test/test_cli.rb +0 -406
  142. data/test/test_client.rb +0 -266
  143. data/test/test_exception_handler.rb +0 -56
  144. data/test/test_extensions.rb +0 -127
  145. data/test/test_fetch.rb +0 -50
  146. data/test/test_launcher.rb +0 -85
  147. data/test/test_logging.rb +0 -35
  148. data/test/test_manager.rb +0 -50
  149. data/test/test_middleware.rb +0 -158
  150. data/test/test_processor.rb +0 -201
  151. data/test/test_rails.rb +0 -22
  152. data/test/test_redis_connection.rb +0 -132
  153. data/test/test_retry.rb +0 -326
  154. data/test/test_retry_exhausted.rb +0 -149
  155. data/test/test_scheduled.rb +0 -115
  156. data/test/test_scheduling.rb +0 -50
  157. data/test/test_sidekiq.rb +0 -107
  158. data/test/test_testing.rb +0 -143
  159. data/test/test_testing_fake.rb +0 -357
  160. data/test/test_testing_inline.rb +0 -94
  161. data/test/test_util.rb +0 -13
  162. data/test/test_web.rb +0 -614
  163. data/test/test_web_helpers.rb +0 -54
  164. data/web/assets/images/bootstrap/glyphicons-halflings-white.png +0 -0
  165. data/web/assets/images/bootstrap/glyphicons-halflings.png +0 -0
  166. data/web/assets/images/status/active.png +0 -0
  167. data/web/assets/images/status/idle.png +0 -0
  168. data/web/assets/javascripts/locales/README.md +0 -27
  169. data/web/assets/javascripts/locales/jquery.timeago.ar.js +0 -96
  170. data/web/assets/javascripts/locales/jquery.timeago.bg.js +0 -18
  171. data/web/assets/javascripts/locales/jquery.timeago.bs.js +0 -49
  172. data/web/assets/javascripts/locales/jquery.timeago.ca.js +0 -18
  173. data/web/assets/javascripts/locales/jquery.timeago.cs.js +0 -18
  174. data/web/assets/javascripts/locales/jquery.timeago.cy.js +0 -20
  175. data/web/assets/javascripts/locales/jquery.timeago.da.js +0 -18
  176. data/web/assets/javascripts/locales/jquery.timeago.de.js +0 -18
  177. data/web/assets/javascripts/locales/jquery.timeago.el.js +0 -18
  178. data/web/assets/javascripts/locales/jquery.timeago.en-short.js +0 -20
  179. data/web/assets/javascripts/locales/jquery.timeago.en.js +0 -20
  180. data/web/assets/javascripts/locales/jquery.timeago.es.js +0 -18
  181. data/web/assets/javascripts/locales/jquery.timeago.et.js +0 -18
  182. data/web/assets/javascripts/locales/jquery.timeago.fa.js +0 -22
  183. data/web/assets/javascripts/locales/jquery.timeago.fi.js +0 -28
  184. data/web/assets/javascripts/locales/jquery.timeago.fr-short.js +0 -16
  185. data/web/assets/javascripts/locales/jquery.timeago.fr.js +0 -17
  186. data/web/assets/javascripts/locales/jquery.timeago.he.js +0 -18
  187. data/web/assets/javascripts/locales/jquery.timeago.hr.js +0 -49
  188. data/web/assets/javascripts/locales/jquery.timeago.hu.js +0 -18
  189. data/web/assets/javascripts/locales/jquery.timeago.hy.js +0 -18
  190. data/web/assets/javascripts/locales/jquery.timeago.id.js +0 -18
  191. data/web/assets/javascripts/locales/jquery.timeago.it.js +0 -16
  192. data/web/assets/javascripts/locales/jquery.timeago.ja.js +0 -19
  193. data/web/assets/javascripts/locales/jquery.timeago.ko.js +0 -17
  194. data/web/assets/javascripts/locales/jquery.timeago.lt.js +0 -20
  195. data/web/assets/javascripts/locales/jquery.timeago.mk.js +0 -20
  196. data/web/assets/javascripts/locales/jquery.timeago.nb.js +0 -18
  197. data/web/assets/javascripts/locales/jquery.timeago.nl.js +0 -20
  198. data/web/assets/javascripts/locales/jquery.timeago.pl.js +0 -31
  199. data/web/assets/javascripts/locales/jquery.timeago.pt-br.js +0 -16
  200. data/web/assets/javascripts/locales/jquery.timeago.pt.js +0 -16
  201. data/web/assets/javascripts/locales/jquery.timeago.ro.js +0 -18
  202. data/web/assets/javascripts/locales/jquery.timeago.rs.js +0 -49
  203. data/web/assets/javascripts/locales/jquery.timeago.ru.js +0 -34
  204. data/web/assets/javascripts/locales/jquery.timeago.sk.js +0 -18
  205. data/web/assets/javascripts/locales/jquery.timeago.sl.js +0 -44
  206. data/web/assets/javascripts/locales/jquery.timeago.sv.js +0 -18
  207. data/web/assets/javascripts/locales/jquery.timeago.th.js +0 -20
  208. data/web/assets/javascripts/locales/jquery.timeago.tr.js +0 -16
  209. data/web/assets/javascripts/locales/jquery.timeago.uk.js +0 -34
  210. data/web/assets/javascripts/locales/jquery.timeago.uz.js +0 -19
  211. data/web/assets/javascripts/locales/jquery.timeago.zh-cn.js +0 -20
  212. data/web/assets/javascripts/locales/jquery.timeago.zh-tw.js +0 -20
  213. data/web/views/_poll_js.erb +0 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: c4e031cb26d8dcc6ab4f404563cd0a711577e586
4
- data.tar.gz: 0a05484ed39032f71dcd2db901afec38f4c9d023
2
+ SHA256:
3
+ metadata.gz: 7e12ddc46413e3e476d620e04428a86476f4826d7802575110b5c3697a096137
4
+ data.tar.gz: 802bdbc7c0d45a9b793222baca250e292ce852d67902446bc75a0961a36f5677
5
5
  SHA512:
6
- metadata.gz: c807c5e398088ee6b344cdce5fa57a77d51c7206a3cc11c4aeb8bc9af186eb82c292c215facb6ae54589ed5b1d95573b74a07622bc452b7ba970d0fb49c207df
7
- data.tar.gz: a56f9815bfc2954b12a9598b6678aee7771ee949d7e886dfc6ddaacbe05f5294e008deccf063c9c39ac430f18322cbdff4468a9ebd3530a9ef8ce780b064bf7e
6
+ metadata.gz: 6180da0e7aefa1573d6b283c56ad365063b290afb5c10a15dc83fb367cb981391d8304acc9ebb1219279a749da71e0af8b37979baea770b0b1efeb04627e0e4c
7
+ data.tar.gz: 35c51c58b73450c6bbd3479cc55d873ed54a6a1ce6a5b7414ca78fc807984acea11d4697ce8c05bdb2e9eb799c30dc7b377872b4c48a3de60bee5d6d71e07b3a
data/Changes.md CHANGED
@@ -1,5 +1,671 @@
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.5.6
6
+ ----------
7
+
8
+ - Fix deprecation warnings with redis-rb 4.8.0 [#5484]
9
+ - Lock redis-rb to < 5.0 as we are moving to redis-client in Sidekiq 7.0
10
+
11
+ 6.5.5
12
+ ----------
13
+
14
+ - Fix require issue with job_retry.rb [#5462]
15
+ - Improve Sidekiq::Web compatibility with Rack 3.x
16
+
17
+ 6.5.4
18
+ ----------
19
+
20
+ - Fix invalid code on Ruby 2.5 [#5460]
21
+ - Fix further metrics dependency issues [#5457]
22
+
23
+ 6.5.3
24
+ ----------
25
+
26
+ - Don't require metrics code without explicit opt-in [#5456]
27
+
28
+ 6.5.2
29
+ ----------
30
+
31
+ - [Job Metrics are under active development, help wanted!](https://github.com/mperham/sidekiq/wiki/Metrics#contributing) **BETA**
32
+ - Add `Context` column on queue page which shows any CurrentAttributes [#5450]
33
+ - `sidekiq_retry_in` may now return `:discard` or `:kill` to dynamically stop job retries [#5406]
34
+ - Smarter sorting of processes in /busy Web UI [#5398]
35
+ - Fix broken hamburger menu in mobile UI [#5428]
36
+ - Require redis-rb 4.5.0. Note that Sidekiq will break if you use the
37
+ [`Redis.exists_returns_integer = false`](https://github.com/redis/redis-rb/blob/master/CHANGELOG.md#450) flag. [#5394]
38
+
39
+ 6.5.1
40
+ ----------
41
+
42
+ - Fix `push_bulk` breakage [#5387]
43
+
44
+ 6.5.0
45
+ ---------
46
+
47
+ - Substantial refactoring of Sidekiq server internals, part of a larger effort
48
+ 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).
49
+ - **Add beta support for the `redis-client` gem**. This will become the default Redis driver in Sidekiq 7.0. [#5298]
50
+ Read more: https://github.com/mperham/sidekiq/wiki/Using-redis-client
51
+ - **Add beta support for DB transaction-aware client** [#5291]
52
+ Add this line to your initializer and any jobs created during a transaction
53
+ will only be pushed to Redis **after the transaction commits**. You will need to add the
54
+ `after_commit_everywhere` gem to your Gemfile.
55
+ ```ruby
56
+ Sidekiq.transactional_push!
57
+ ```
58
+ This feature does not have a lot of production usage yet; please try it out and let us
59
+ know if you have any issues. It will be fully supported in Sidekiq 7.0 or removed if it
60
+ proves problematic.
61
+ - Fix regression with middleware arguments [#5312]
62
+
63
+ 6.4.2
64
+ ---------
65
+
66
+ - Strict argument checking now runs after client-side middleware [#5246]
67
+ - Fix page events with live polling [#5184]
68
+ - Many under-the-hood changes to remove all usage of the term "worker"
69
+ from the Sidekiq codebase and APIs. This mostly involved RDoc and local
70
+ variable names but a few constants and public APIs were changed. The old
71
+ APIs will be removed in Sidekiq 7.0.
72
+ ```
73
+ Sidekiq::DEFAULT_WORKER_OPTIONS -> Sidekiq.default_job_options
74
+ Sidekiq.default_worker_options -> Sidekiq.default_job_options
75
+ Sidekiq::Queues["default"].jobs_by_worker(HardJob) -> Sidekiq::Queues["default"].jobs_by_class(HardJob)
76
+ ```
77
+
78
+ 6.4.1
79
+ ---------
80
+
81
+ - Fix pipeline/multi deprecations in redis-rb 4.6
82
+ - Fix sidekiq.yml YAML load errors on Ruby 3.1 [#5141]
83
+ - Sharding support for `perform_bulk` [#5129]
84
+ - Refactor job logger for SPEEEEEEED
85
+
86
+ 6.4.0
87
+ ---------
88
+
89
+ - **SECURITY**: Validate input to avoid possible DoS in Web UI.
90
+ - Add **strict argument checking** [#5071]
91
+ Sidekiq will now log a warning if JSON-unsafe arguments are passed to `perform_async`.
92
+ Add `Sidekiq.strict_args!(false)` to your initializer to disable this warning.
93
+ This warning will switch to an exception in Sidekiq 7.0.
94
+ - Note that Delayed Extensions will be removed in Sidekiq 7.0 [#5076]
95
+ - Add `perform_{inline,sync}` in Sidekiq::Job to run a job synchronously [#5061, hasan-ally]
96
+ ```ruby
97
+ SomeJob.perform_async(args...)
98
+ SomeJob.perform_sync(args...)
99
+ SomeJob.perform_inline(args...)
100
+ ```
101
+ You can also dynamically redirect a job to run synchronously:
102
+ ```ruby
103
+ SomeJob.set("sync": true).perform_async(args...) # will run via perform_inline
104
+ ```
105
+ - Replace Sidekiq::Worker `app/workers` generator with Sidekiq::Job `app/sidekiq` generator [#5055]
106
+ ```
107
+ bin/rails generate sidekiq:job ProcessOrderJob
108
+ ```
109
+ - Fix job retries losing CurrentAttributes [#5090]
110
+ - Tweak shutdown to give long-running threads time to cleanup [#5095]
111
+
112
+ 6.3.1
113
+ ---------
114
+
115
+ - Fix keyword arguments error with CurrentAttributes on Ruby 3.0 [#5048]
116
+
117
+ 6.3.0
118
+ ---------
119
+
120
+ - **BREAK**: The Web UI has been refactored to remove jQuery. Any UI extensions
121
+ which use jQuery will break.
122
+ - **FEATURE**: Sidekiq.logger has been enhanced so any `Rails.logger`
123
+ output in jobs now shows up in the Sidekiq console. Remove any logger
124
+ hacks in your initializer and see if it Just Works™ now. [#5021]
125
+ - **FEATURE**: Add `Sidekiq::Job` alias for `Sidekiq::Worker`, to better
126
+ reflect industry standard terminology. You can now do this:
127
+ ```ruby
128
+ class MyJob
129
+ include Sidekiq::Job
130
+ sidekiq_options ...
131
+ def perform(args)
132
+ end
133
+ end
134
+ ```
135
+ - **FEATURE**: Support for serializing ActiveSupport::CurrentAttributes into each job. [#4982]
136
+ ```ruby
137
+ # config/initializers/sidekiq.rb
138
+ require "sidekiq/middleware/current_attributes"
139
+ Sidekiq::CurrentAttributes.persist(Myapp::Current) # Your AS::CurrentAttributes singleton
140
+ ```
141
+ - **FEATURE**: Add `Sidekiq::Worker.perform_bulk` for enqueuing jobs in bulk,
142
+ similar to `Sidekiq::Client.push_bulk` [#5042]
143
+ ```ruby
144
+ MyJob.perform_bulk([[1], [2], [3]])
145
+ ```
146
+ - Implement `queue_as`, `wait` and `wait_until` for ActiveJob compatibility [#5003]
147
+ - Scheduler now uses Lua to reduce Redis load and network roundtrips [#5044]
148
+ - Retry Redis operation if we get an `UNBLOCKED` Redis error [#4985]
149
+ - Run existing signal traps, if any, before running Sidekiq's trap [#4991]
150
+ - Fix fetch bug when using weighted queues which caused Sidekiq to stop
151
+ processing queues randomly [#5031]
152
+
153
+ 6.2.2
154
+ ---------
155
+
156
+ - Reduce retry jitter, add jitter to `sidekiq_retry_in` values [#4957]
157
+ - Minimize scheduler load on Redis at scale [#4882]
158
+ - Improve logging of delay jobs [#4904, BuonOno]
159
+ - Minor CSS improvements for buttons and tables, design PRs always welcome!
160
+ - Tweak Web UI `Cache-Control` header [#4966]
161
+ - Rename internal API class `Sidekiq::Job` to `Sidekiq::JobRecord` [#4955]
162
+
163
+ 6.2.1
164
+ ---------
165
+
166
+ - Update RTT warning logic to handle transient RTT spikes [#4851]
167
+ - Fix very low priority CVE on unescaped queue name [#4852]
168
+ - Add note about sessions and Rails apps in API mode
169
+
170
+ 6.2.0
171
+ ---------
172
+
173
+ - Store Redis RTT and log if poor [#4824]
174
+ - Add process/thread stats to Busy page [#4806]
175
+ - Improve Web UI on mobile devices [#4840]
176
+ - **Refactor Web UI session usage** [#4804]
177
+ Numerous people have hit "Forbidden" errors and struggled with Sidekiq's
178
+ Web UI session requirement. If you have code in your initializer for
179
+ Web sessions, it's quite possible it will need to be removed. Here's
180
+ an overview:
181
+ ```
182
+ Sidekiq::Web needs a valid Rack session for CSRF protection. If this is a Rails app,
183
+ make sure you mount Sidekiq::Web *inside* your routes in `config/routes.rb` so
184
+ Sidekiq can reuse the Rails session:
185
+
186
+ Rails.application.routes.draw do
187
+ mount Sidekiq::Web => "/sidekiq"
188
+ ....
189
+ end
190
+
191
+ If this is a bare Rack app, use a session middleware before Sidekiq::Web:
192
+
193
+ # first, use IRB to create a shared secret key for sessions and commit it
194
+ require 'securerandom'; File.open(".session.key", "w") {|f| f.write(SecureRandom.hex(32)) }
195
+
196
+ # now, update your Rack app to include the secret with a session cookie middleware
197
+ use Rack::Session::Cookie, secret: File.read(".session.key"), same_site: true, max_age: 86400
198
+ run Sidekiq::Web
199
+
200
+ If this is a Rails app in API mode, you need to enable sessions.
201
+
202
+ https://guides.rubyonrails.org/api_app.html#using-session-middlewares
203
+ ```
204
+
205
+ 6.1.3
206
+ ---------
207
+
208
+ - Warn if Redis is configured to evict data under memory pressure [#4752]
209
+ - Add process RSS on the Busy page [#4717]
210
+
211
+ 6.1.2
212
+ ---------
213
+
214
+ - Improve readability in dark mode Web UI [#4674]
215
+ - Fix Web UI crash with corrupt session [#4672]
216
+ - Allow middleware to yield arguments [#4673, @eugeneius]
217
+ - Migrate CI from CircleCI to GitHub Actions [#4677]
218
+
219
+ 6.1.1
220
+ ---------
221
+
222
+ - Jobs are now sorted by age in the Busy Workers table. [#4641]
223
+ - Fix "check all" JS logic in Web UI [#4619]
224
+
225
+ 6.1.0
226
+ ---------
227
+
228
+ - Web UI - Dark Mode fixes [#4543, natematykiewicz]
229
+ - Ensure `Rack::ContentLength` is loaded as middleware for correct Web UI responses [#4541]
230
+ - Avoid exception dumping SSL store in Redis connection logging [#4532]
231
+ - Better error messages in Sidekiq::Client [#4549]
232
+ - Remove rack-protection, reimplement CSRF protection [#4588]
233
+ - Require redis-rb 4.2 [#4591]
234
+ - Update to jquery 1.12.4 [#4593]
235
+ - Refactor internal fetch logic and API [#4602]
236
+
237
+ 6.0.7
238
+ ---------
239
+
240
+ - Refactor systemd integration to work better with custom binaries [#4511]
241
+ - Don't connect to Redis at process exit if not needed [#4502]
242
+ - Remove Redis connection naming [#4479]
243
+ - Fix Redis Sentinel password redaction [#4499]
244
+ - Add Vietnamese locale (vi) [#4528]
245
+
246
+ 6.0.6
247
+ ---------
248
+
249
+ - **Integrate with systemd's watchdog and notification features** [#4488]
250
+ Set `Type=notify` in [sidekiq.service](https://github.com/mperham/sidekiq/blob/4b8a8bd3ae42f6e48ae1fdaf95ed7d7af18ed8bb/examples/systemd/sidekiq.service#L30-L39). The integration works automatically.
251
+ - Use `setTimeout` rather than `setInterval` to avoid thundering herd [#4480]
252
+ - Fix edge case where a job can be pushed without a queue.
253
+ - Flush job stats at exit [#4498]
254
+ - Check RAILS_ENV before RACK_ENV [#4493]
255
+ - Add Lithuanian locale [#4476]
256
+
257
+ 6.0.5
258
+ ---------
259
+
260
+ - Fix broken Web UI response when using NewRelic and Rack 2.1.2+. [#4440]
261
+ - Update APIs to use `UNLINK`, not `DEL`. [#4449]
262
+ - Fix Ruby 2.7 warnings [#4412]
263
+ - Add support for `APP_ENV` [[95fa5d9]](https://github.com/mperham/sidekiq/commit/95fa5d90192148026e52ca2902f1b83c70858ce8)
264
+
265
+ 6.0.4
266
+ ---------
267
+
268
+ - Fix ActiveJob's `sidekiq_options` integration [#4404]
269
+ - Sidekiq Pro users will now see a Pause button next to each queue in
270
+ the Web UI, allowing them to pause queues manually [#4374, shayonj]
271
+ - Fix Sidekiq::Workers API unintentional change in 6.0.2 [#4387]
272
+
273
+
274
+ 6.0.3
275
+ ---------
276
+
277
+ - Fix `Sidekiq::Client.push_bulk` API which was erroneously putting
278
+ invalid `at` values in the job payloads [#4321]
279
+
280
+ 6.0.2
281
+ ---------
282
+
283
+ - Fix Sidekiq Enterprise's rolling restart functionality, broken by refactoring in 6.0.0. [#4334]
284
+ - More internal refactoring and performance tuning [fatkodima]
285
+
286
+ 6.0.1
287
+ ---------
288
+
289
+ - **Performance tuning**, Sidekiq should be 10-15% faster now [#4303, 4299,
290
+ 4269, fatkodima]
291
+ - **Dark Mode support in Web UI** (further design polish welcome!) [#4227, mperham,
292
+ fatkodima, silent-e]
293
+ - **Job-specific log levels**, allowing you to turn on debugging for
294
+ problematic workers. [fatkodima, #4287]
295
+ ```ruby
296
+ MyWorker.set(log_level: :debug).perform_async(...)
297
+ ```
298
+ - **Ad-hoc job tags**. You can tag your jobs with, e.g, subdomain, tenant, country,
299
+ locale, application, version, user/client, "alpha/beta/pro/ent", types of jobs,
300
+ teams/people responsible for jobs, additional metadata, etc.
301
+ Tags are shown on different pages with job listings. Sidekiq Pro users
302
+ can filter based on them [fatkodima, #4280]
303
+ ```ruby
304
+ class MyWorker
305
+ include Sidekiq::Worker
306
+ sidekiq_options tags: ['bank-ops', 'alpha']
307
+ ...
308
+ end
309
+ ```
310
+ - Fetch scheduled jobs in batches before pushing into specific queues.
311
+ This will decrease enqueueing time of scheduled jobs by a third. [fatkodima, #4273]
312
+ ```
313
+ ScheduledSet with 10,000 jobs
314
+ Before: 56.6 seconds
315
+ After: 39.2 seconds
316
+ ```
317
+ - Compress error backtraces before pushing into Redis, if you are
318
+ storing error backtraces, this will halve the size of your RetrySet
319
+ in Redis [fatkodima, #4272]
320
+ ```
321
+ RetrySet with 100,000 jobs
322
+ Before: 261 MB
323
+ After: 129 MB
324
+ ```
325
+ - Support display of ActiveJob 6.0 payloads in the Web UI [#4263]
326
+ - Add `SortedSet#scan` for pattern based scanning. For large sets this API will be **MUCH** faster
327
+ than standard iteration using each. [fatkodima, #4262]
328
+ ```ruby
329
+ Sidekiq::DeadSet.new.scan("UnreliableApi") do |job|
330
+ job.retry
331
+ end
332
+ ```
333
+ - Dramatically speed up SortedSet#find\_job(jid) by using Redis's ZSCAN
334
+ support, approx 10x faster. [fatkodima, #4259]
335
+ ```
336
+ zscan 0.179366 0.047727 0.227093 ( 1.161376)
337
+ enum 8.522311 0.419826 8.942137 ( 9.785079)
338
+ ```
339
+ - Respect rails' generators `test_framework` option and gracefully handle extra `worker` suffix on generator [fatkodima, #4256]
340
+ - Add ability to sort 'Enqueued' page on Web UI by position in the queue [fatkodima, #4248]
341
+ - Support `Client.push_bulk` with different delays [fatkodima, #4243]
342
+ ```ruby
343
+ Sidekiq::Client.push_bulk("class" => FooJob, "args" => [[1], [2]], "at" => [1.minute.from_now.to_f, 5.minutes.from_now.to_f])
344
+ ```
345
+ - Easier way to test enqueuing specific ActionMailer and ActiveRecord delayed jobs. Instead of manually
346
+ parsing embedded class, you can now test by fetching jobs for specific classes. [fatkodima, #4292]
347
+ ```ruby
348
+ assert_equal 1, Sidekiq::Extensions::DelayedMailer.jobs_for(FooMailer).size
349
+ ```
350
+ - Add `sidekiqmon` to gemspec executables [#4242]
351
+ - Gracefully handle `Sidekiq.logger = nil` [#4240]
352
+ - Inject Sidekiq::LogContext module if user-supplied logger does not include it [#4239]
353
+
354
+ 6.0
355
+ ---------
356
+
357
+ This release has major breaking changes. Read and test carefully in production.
358
+
359
+ - With Rails 6.0.2+, ActiveJobs can now use `sidekiq_options` directly to configure Sidekiq
360
+ features/internals like the retry subsystem. [#4213, pirj]
361
+ ```ruby
362
+ class MyJob < ActiveJob::Base
363
+ queue_as :myqueue
364
+ sidekiq_options retry: 10, backtrace: 20
365
+ def perform(...)
366
+ end
367
+ end
368
+ ```
369
+ - Logging has been redesigned to allow for pluggable log formatters:
370
+ ```ruby
371
+ Sidekiq.configure_server do |config|
372
+ config.log_formatter = Sidekiq::Logger::Formatters::JSON.new
373
+ end
374
+ ```
375
+ See the [Logging wiki page](https://github.com/mperham/sidekiq/wiki/Logging) for more details.
376
+ - **BREAKING CHANGE** Validate proper usage of the `REDIS_PROVIDER`
377
+ variable. This variable is meant to hold the name of the environment
378
+ variable which contains your Redis URL, so that you can switch Redis
379
+ providers quickly and easily with a single variable change. It is not
380
+ meant to hold the actual Redis URL itself. If you want to manually set
381
+ the Redis URL (not recommended as it implies you have no failover),
382
+ then you may set `REDIS_URL` directly. [#3969]
383
+ - **BREAKING CHANGE** Increase default shutdown timeout from 8 seconds
384
+ to 25 seconds. Both Heroku and ECS now use 30 second shutdown timeout
385
+ by default and we want Sidekiq to take advantage of this time. If you
386
+ have deployment scripts which depend on the old default timeout, use `-t 8` to
387
+ get the old behavior. [#3968]
388
+ - **BREAKING CHANGE** Remove the daemonization, logfile and pidfile
389
+ arguments to Sidekiq. Use a proper process supervisor (e.g. systemd or
390
+ foreman) to manage Sidekiq. See the Deployment wiki page for links to
391
+ more resources.
392
+ - Integrate the StandardRB code formatter to ensure consistent code
393
+ styling. [#4114, gearnode]
394
+
395
+ 5.2.10
396
+ ---------
397
+
398
+ - Backport fix for CVE-2022-23837.
399
+ - Migrate to `exists?` for redis-rb.
400
+ - Lock redis-rb to <4.6 to avoid deprecations.
401
+
402
+ 5.2.9
403
+ ---------
404
+
405
+ - Release Rack lock due to a cascade of CVEs. [#4566]
406
+ Pro-tip: don't lock Rack.
407
+
408
+ 5.2.8
409
+ ---------
410
+
411
+ - Lock to Rack 2.0.x to prevent future incompatibilities
412
+ - Fix invalid reference in `sidekiqctl`
413
+
414
+ 5.2.7
415
+ ---------
416
+
417
+ - Fix stale `enqueued_at` when retrying [#4149]
418
+ - Move build to [Circle CI](https://circleci.com/gh/mperham/sidekiq) [#4120]
419
+
420
+ 5.2.6
421
+ ---------
422
+
423
+ - Fix edge case where a job failure during Redis outage could result in a lost job [#4141]
424
+ - Better handling of malformed job arguments in payload [#4095]
425
+ - Restore bootstap's dropdown css component [#4099, urkle]
426
+ - Display human-friendly time diff for longer queue latencies [#4111, interlinked]
427
+ - Allow `Sidekiq::Worker#set` to be chained
428
+
429
+ 5.2.5
430
+ ---------
431
+
432
+ - Fix default usage of `config/sidekiq.yml` [#4077, Tensho]
433
+
434
+ 5.2.4
435
+ ---------
436
+
437
+ - Add warnings for various deprecations and changes coming in Sidekiq 6.0.
438
+ See the 6-0 branch. [#4056]
439
+ - Various improvements to the Sidekiq test suite and coverage [#4026, #4039, Tensho]
440
+
441
+ 5.2.3
442
+ ---------
443
+
444
+ - Warning message on invalid REDIS\_PROVIDER [#3970]
445
+ - Add `sidekiqctl status` command [#4003, dzunk]
446
+ - Update elapsed time calculatons to use monotonic clock [#3999]
447
+ - Fix a few issues with mobile Web UI styling [#3973, navied]
448
+ - Jobs with `retry: false` now go through the global `death_handlers`,
449
+ meaning you can take action on failed ephemeral jobs. [#3980, Benjamin-Dobell]
450
+ - Fix race condition in defining Workers. [#3997, mattbooks]
451
+
452
+ 5.2.2
453
+ ---------
454
+
455
+ - Raise error for duplicate queue names in config to avoid unexpected fetch algorithm change [#3911]
456
+ - Fix concurrency bug on JRuby [#3958, mattbooks]
457
+ - Add "Kill All" button to the retries page [#3938]
458
+
459
+ 5.2.1
460
+ -----------
461
+
462
+ - Fix concurrent modification error during heartbeat [#3921]
463
+
464
+ 5.2.0
465
+ -----------
466
+
467
+ - **Decrease default concurrency from 25 to 10** [#3892]
468
+ - Verify connection pool sizing upon startup [#3917]
469
+ - Smoother scheduling for large Sidekiq clusters [#3889]
470
+ - Switch Sidekiq::Testing impl from alias\_method to Module#prepend, for resiliency [#3852]
471
+ - Update Sidekiq APIs to use SCAN for scalability [#3848, ffiller]
472
+ - Remove concurrent-ruby gem dependency [#3830]
473
+ - Optimize Web UI's bootstrap.css [#3914]
474
+
475
+ 5.1.3
476
+ -----------
477
+
478
+ - Fix version comparison so Ruby 2.2.10 works. [#3808, nateberkopec]
479
+
480
+ 5.1.2
481
+ -----------
482
+
483
+ - Add link to docs in Web UI footer
484
+ - Fix crash on Ctrl-C in Windows [#3775, Bernica]
485
+ - Remove `freeze` calls on String constants. This is superfluous with Ruby
486
+ 2.3+ and `frozen_string_literal: true`. [#3759]
487
+ - Fix use of AR middleware outside of Rails [#3787]
488
+ - Sidekiq::Worker `sidekiq_retry_in` block can now return nil or 0 to use
489
+ the default backoff delay [#3796, dsalahutdinov]
490
+
491
+ 5.1.1
492
+ -----------
493
+
494
+ - Fix Web UI incompatibility with Redis 3.x gem [#3749]
495
+
496
+ 5.1.0
497
+ -----------
498
+
499
+ - **NEW** Global death handlers - called when your job exhausts all
500
+ retries and dies. Now you can take action when a job fails permanently. [#3721]
501
+ - **NEW** Enable ActiveRecord query cache within jobs by default [#3718, sobrinho]
502
+ This will prevent duplicate SELECTS; cache is cleared upon any UPDATE/INSERT/DELETE.
503
+ See the issue for how to bypass the cache or disable it completely.
504
+ - Scheduler timing is now more accurate, 15 -> 5 seconds [#3734]
505
+ - Exceptions during the :startup event will now kill the process [#3717]
506
+ - Make `Sidekiq::Client.via` reentrant [#3715]
507
+ - Fix use of Sidekiq logger outside of the server process [#3714]
508
+ - Tweak `constantize` to better match Rails class lookup. [#3701, caffeinated-tech]
509
+
510
+ 5.0.5
511
+ -----------
512
+
513
+ - Update gemspec to allow newer versions of the Redis gem [#3617]
514
+ - Refactor Worker.set so it can be memoized [#3602]
515
+ - Fix display of Redis URL in web footer, broken in 5.0.3 [#3560]
516
+ - Update `Sidekiq::Job#display_args` to avoid mutation [#3621]
517
+
518
+ 5.0.4
519
+ -----------
520
+
521
+ - Fix "slow startup" performance regression from 5.0.2. [#3525]
522
+ - Allow users to disable ID generation since some redis providers disable the CLIENT command. [#3521]
523
+
524
+ 5.0.3
525
+ -----------
526
+
527
+ - Fix overriding `class_attribute` core extension from ActiveSupport with Sidekiq one [PikachuEXE, #3499]
528
+ - Allow job logger to be overridden [AlfonsoUceda, #3502]
529
+ - Set a default Redis client identifier for debugging [#3516]
530
+ - Fix "Uninitialized constant" errors on startup with the delayed extensions [#3509]
531
+
532
+ 5.0.2
533
+ -----------
534
+
535
+ - fix broken release, thanks @nateberkopec
536
+
537
+ 5.0.1
538
+ -----------
539
+
540
+ - Fix incorrect server identity when daemonizing [jwilm, #3496]
541
+ - Work around error running Web UI against Redis Cluster [#3492]
542
+ - Remove core extensions, Sidekiq is now monkeypatch-free! [#3474]
543
+ - Reimplement Web UI's HTTP\_ACCEPT\_LANGUAGE parsing because the spec is utterly
544
+ incomprehensible for various edge cases. [johanlunds, natematykiewicz, #3449]
545
+ - Update `class_attribute` core extension to avoid warnings
546
+ - Expose `job_hash_context` from `Sidekiq::Logging` to support log customization
547
+
548
+ 5.0.0
549
+ -----------
550
+
551
+ - **BREAKING CHANGE** Job dispatch was refactored for safer integration with
552
+ Rails 5. The **Logging** and **RetryJobs** server middleware were removed and
553
+ functionality integrated directly into Sidekiq::Processor. These aren't
554
+ commonly used public APIs so this shouldn't impact most users.
555
+ ```
556
+ Sidekiq::Middleware::Server::RetryJobs -> Sidekiq::JobRetry
557
+ Sidekiq::Middleware::Server::Logging -> Sidekiq::JobLogger
558
+ ```
559
+ - Quieting Sidekiq is now done via the TSTP signal, the USR1 signal is deprecated.
560
+ - The `delay` extension APIs are no longer available by default, you
561
+ must opt into them.
562
+ - The Web UI is now BiDi and can render RTL languages like Arabic, Farsi and Hebrew.
563
+ - Rails 3.2 and Ruby 2.0 and 2.1 are no longer supported.
564
+ - The `SomeWorker.set(options)` API was re-written to avoid thread-local state. [#2152]
565
+ - Sidekiq Enterprise's encrypted jobs now display "[encrypted data]" in the Web UI instead
566
+ of random hex bytes.
567
+ - Please see the [5.0 Upgrade notes](5.0-Upgrade.md) for more detail.
568
+
569
+ 4.2.10
570
+ -----------
571
+
572
+ - Scheduled jobs can now be moved directly to the Dead queue via API [#3390]
573
+ - Fix edge case leading to job duplication when using Sidekiq Pro's
574
+ reliability feature [#3388]
575
+ - Fix error class name display on retry page [#3348]
576
+ - More robust latency calculation [#3340]
577
+
578
+ 4.2.9
579
+ -----------
580
+
581
+ - Rollback [#3303] which broke Heroku Redis users [#3311]
582
+ - Add support for TSTP signal, for Sidekiq 5.0 forward compatibility. [#3302]
583
+
584
+ 4.2.8
585
+ -----------
586
+
587
+ - Fix rare edge case with Redis driver that can create duplicate jobs [#3303]
588
+ - Fix Rails 5 loading issue [#3275]
589
+ - Restore missing tooltips to timestamps in Web UI [#3310]
590
+ - Work on **Sidekiq 5.0** is now active! [#3301]
591
+
592
+ 4.2.7
593
+ -----------
594
+
595
+ - Add new integration testing to verify code loading and job execution
596
+ in development and production modes with Rails 4 and 5 [#3241]
597
+ - Fix delayed extensions in development mode [#3227, DarthSim]
598
+ - Use Worker's `retry` default if job payload does not have a retry
599
+ attribute [#3234, mlarraz]
600
+
601
+ 4.2.6
602
+ -----------
603
+
604
+ - Run Rails Executor when in production [#3221, eugeneius]
605
+
606
+ 4.2.5
607
+ -----------
608
+
609
+ - Re-enable eager loading of all code when running non-development Rails 5. [#3203]
610
+ - Better root URL handling for zany web servers [#3207]
611
+
612
+ 4.2.4
613
+ -----------
614
+
615
+ - Log errors coming from the Rails 5 reloader. [#3212, eugeneius]
616
+ - Clone job data so middleware changes don't appear in Busy tab
617
+
618
+ 4.2.3
619
+ -----------
620
+
621
+ - Disable use of Rails 5's Reloader API in non-development modes, it has proven
622
+ to be unstable under load [#3154]
623
+ - Allow disabling of Sidekiq::Web's cookie session to handle the
624
+ case where the app provides a session already [#3180, inkstak]
625
+ ```ruby
626
+ Sidekiq::Web.set :sessions, false
627
+ ```
628
+ - Fix Web UI sharding support broken in 4.2.2. [#3169]
629
+ - Fix timestamps not updating during UI polling [#3193, shaneog]
630
+ - Relax rack-protection version to >= 1.5.0
631
+ - Provide consistent interface to exception handlers, changing the structure of the context hash. [#3161]
632
+
633
+ 4.2.2
634
+ -----------
635
+
636
+ - Fix ever-increasing cookie size with nginx [#3146, cconstantine]
637
+ - Fix so Web UI works without trailing slash [#3158, timdorr]
638
+
639
+ 4.2.1
640
+ -----------
641
+
642
+ - Ensure browser does not cache JSON/AJAX responses. [#3136]
643
+ - Support old Sinatra syntax for setting config [#3139]
644
+
645
+ 4.2.0
646
+ -----------
647
+
648
+ - Enable development-mode code reloading. **With Rails 5.0+, you don't need
649
+ to restart Sidekiq to pick up your Sidekiq::Worker changes anymore!** [#2457]
650
+ - **Remove Sinatra dependency**. Sidekiq's Web UI now uses Rack directly.
651
+ Thank you to Sidekiq's newest committer, **badosu**, for writing the code
652
+ and doing a lot of testing to ensure compatibility with many different
653
+ 3rd party plugins. If your Web UI works with 4.1.4 but fails with
654
+ 4.2.0, please open an issue. [#3075]
655
+ - Allow tuning of concurrency with the `RAILS_MAX_THREADS` env var. [#2985]
656
+ This is the same var used by Puma so you can tune all of your systems
657
+ the same way:
658
+ ```sh
659
+ web: RAILS_MAX_THREADS=5 bundle exec puma ...
660
+ worker: RAILS_MAX_THREADS=10 bundle exec sidekiq ...
661
+ ```
662
+ Using `-c` or `config/sidekiq.yml` overrides this setting. I recommend
663
+ adjusting your `config/database.yml` to use it too so connections are
664
+ auto-scaled:
665
+ ```yaml
666
+ pool: <%= ENV['RAILS_MAX_THREADS'] || 5 %>
667
+ ```
668
+
3
669
  4.1.4
4
670
  -----------
5
671
 
data/LICENSE CHANGED
@@ -4,6 +4,6 @@ Sidekiq is an Open Source project licensed under the terms of
4
4
  the LGPLv3 license. Please see <http://www.gnu.org/licenses/lgpl-3.0.html>
5
5
  for license text.
6
6
 
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.
7
+ Sidekiq Pro and Sidekiq Enterprise have a commercial-friendly license.
8
+ You can find the commercial license in COMM-LICENSE.txt.
9
+ Please see https://sidekiq.org for purchasing options.