sidekiq 5.1.3 → 7.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (157) hide show
  1. checksums.yaml +5 -5
  2. data/Changes.md +756 -8
  3. data/LICENSE.txt +9 -0
  4. data/README.md +48 -51
  5. data/bin/multi_queue_bench +271 -0
  6. data/bin/sidekiq +22 -3
  7. data/bin/sidekiqload +213 -115
  8. data/bin/sidekiqmon +11 -0
  9. data/lib/generators/sidekiq/job_generator.rb +59 -0
  10. data/lib/generators/sidekiq/templates/{worker.rb.erb → job.rb.erb} +2 -2
  11. data/lib/generators/sidekiq/templates/{worker_spec.rb.erb → job_spec.rb.erb} +1 -1
  12. data/lib/generators/sidekiq/templates/{worker_test.rb.erb → job_test.rb.erb} +1 -1
  13. data/lib/sidekiq/api.rb +640 -330
  14. data/lib/sidekiq/capsule.rb +132 -0
  15. data/lib/sidekiq/cli.rb +244 -257
  16. data/lib/sidekiq/client.rb +132 -103
  17. data/lib/sidekiq/component.rb +68 -0
  18. data/lib/sidekiq/config.rb +293 -0
  19. data/lib/sidekiq/deploy.rb +64 -0
  20. data/lib/sidekiq/embedded.rb +63 -0
  21. data/lib/sidekiq/fetch.rb +49 -42
  22. data/lib/sidekiq/iterable_job.rb +55 -0
  23. data/lib/sidekiq/job/interrupt_handler.rb +24 -0
  24. data/lib/sidekiq/job/iterable/active_record_enumerator.rb +53 -0
  25. data/lib/sidekiq/job/iterable/csv_enumerator.rb +47 -0
  26. data/lib/sidekiq/job/iterable/enumerators.rb +135 -0
  27. data/lib/sidekiq/job/iterable.rb +231 -0
  28. data/lib/sidekiq/job.rb +385 -0
  29. data/lib/sidekiq/job_logger.rb +49 -12
  30. data/lib/sidekiq/job_retry.rb +167 -103
  31. data/lib/sidekiq/job_util.rb +109 -0
  32. data/lib/sidekiq/launcher.rb +209 -102
  33. data/lib/sidekiq/logger.rb +131 -0
  34. data/lib/sidekiq/manager.rb +43 -46
  35. data/lib/sidekiq/metrics/query.rb +158 -0
  36. data/lib/sidekiq/metrics/shared.rb +97 -0
  37. data/lib/sidekiq/metrics/tracking.rb +148 -0
  38. data/lib/sidekiq/middleware/chain.rb +113 -56
  39. data/lib/sidekiq/middleware/current_attributes.rb +113 -0
  40. data/lib/sidekiq/middleware/i18n.rb +7 -7
  41. data/lib/sidekiq/middleware/modules.rb +23 -0
  42. data/lib/sidekiq/monitor.rb +147 -0
  43. data/lib/sidekiq/paginator.rb +28 -16
  44. data/lib/sidekiq/processor.rb +175 -112
  45. data/lib/sidekiq/rails.rb +54 -39
  46. data/lib/sidekiq/redis_client_adapter.rb +114 -0
  47. data/lib/sidekiq/redis_connection.rb +65 -86
  48. data/lib/sidekiq/ring_buffer.rb +31 -0
  49. data/lib/sidekiq/scheduled.rb +139 -48
  50. data/lib/sidekiq/sd_notify.rb +149 -0
  51. data/lib/sidekiq/systemd.rb +26 -0
  52. data/lib/sidekiq/testing/inline.rb +6 -5
  53. data/lib/sidekiq/testing.rb +95 -94
  54. data/lib/sidekiq/transaction_aware_client.rb +51 -0
  55. data/lib/sidekiq/version.rb +3 -1
  56. data/lib/sidekiq/web/action.rb +22 -12
  57. data/lib/sidekiq/web/application.rb +225 -76
  58. data/lib/sidekiq/web/csrf_protection.rb +183 -0
  59. data/lib/sidekiq/web/helpers.rb +215 -118
  60. data/lib/sidekiq/web/router.rb +23 -19
  61. data/lib/sidekiq/web.rb +114 -106
  62. data/lib/sidekiq/worker_compatibility_alias.rb +13 -0
  63. data/lib/sidekiq.rb +95 -182
  64. data/sidekiq.gemspec +26 -23
  65. data/web/assets/images/apple-touch-icon.png +0 -0
  66. data/web/assets/javascripts/application.js +157 -61
  67. data/web/assets/javascripts/base-charts.js +106 -0
  68. data/web/assets/javascripts/chart.min.js +13 -0
  69. data/web/assets/javascripts/chartjs-plugin-annotation.min.js +7 -0
  70. data/web/assets/javascripts/dashboard-charts.js +192 -0
  71. data/web/assets/javascripts/dashboard.js +35 -283
  72. data/web/assets/javascripts/metrics.js +298 -0
  73. data/web/assets/stylesheets/application-dark.css +147 -0
  74. data/web/assets/stylesheets/application-rtl.css +10 -93
  75. data/web/assets/stylesheets/application.css +169 -522
  76. data/web/assets/stylesheets/bootstrap.css +2 -2
  77. data/web/locales/ar.yml +71 -64
  78. data/web/locales/cs.yml +62 -62
  79. data/web/locales/da.yml +60 -53
  80. data/web/locales/de.yml +65 -53
  81. data/web/locales/el.yml +43 -24
  82. data/web/locales/en.yml +86 -65
  83. data/web/locales/es.yml +70 -54
  84. data/web/locales/fa.yml +65 -65
  85. data/web/locales/fr.yml +83 -62
  86. data/web/locales/gd.yml +99 -0
  87. data/web/locales/he.yml +65 -64
  88. data/web/locales/hi.yml +59 -59
  89. data/web/locales/it.yml +53 -53
  90. data/web/locales/ja.yml +75 -64
  91. data/web/locales/ko.yml +52 -52
  92. data/web/locales/lt.yml +83 -0
  93. data/web/locales/nb.yml +61 -61
  94. data/web/locales/nl.yml +52 -52
  95. data/web/locales/pl.yml +45 -45
  96. data/web/locales/pt-br.yml +83 -55
  97. data/web/locales/pt.yml +51 -51
  98. data/web/locales/ru.yml +68 -63
  99. data/web/locales/sv.yml +53 -53
  100. data/web/locales/ta.yml +60 -60
  101. data/web/locales/tr.yml +101 -0
  102. data/web/locales/uk.yml +62 -61
  103. data/web/locales/ur.yml +64 -64
  104. data/web/locales/vi.yml +83 -0
  105. data/web/locales/zh-cn.yml +43 -16
  106. data/web/locales/zh-tw.yml +42 -8
  107. data/web/views/_footer.erb +18 -3
  108. data/web/views/_job_info.erb +21 -4
  109. data/web/views/_metrics_period_select.erb +12 -0
  110. data/web/views/_nav.erb +4 -18
  111. data/web/views/_paging.erb +2 -0
  112. data/web/views/_poll_link.erb +3 -6
  113. data/web/views/_summary.erb +7 -7
  114. data/web/views/busy.erb +79 -29
  115. data/web/views/dashboard.erb +49 -19
  116. data/web/views/dead.erb +3 -3
  117. data/web/views/filtering.erb +7 -0
  118. data/web/views/layout.erb +9 -7
  119. data/web/views/metrics.erb +91 -0
  120. data/web/views/metrics_for_job.erb +59 -0
  121. data/web/views/morgue.erb +14 -15
  122. data/web/views/queue.erb +33 -23
  123. data/web/views/queues.erb +19 -5
  124. data/web/views/retries.erb +19 -16
  125. data/web/views/retry.erb +3 -3
  126. data/web/views/scheduled.erb +17 -15
  127. metadata +84 -129
  128. data/.github/contributing.md +0 -32
  129. data/.github/issue_template.md +0 -11
  130. data/.gitignore +0 -13
  131. data/.travis.yml +0 -14
  132. data/3.0-Upgrade.md +0 -70
  133. data/4.0-Upgrade.md +0 -53
  134. data/5.0-Upgrade.md +0 -56
  135. data/COMM-LICENSE +0 -95
  136. data/Ent-Changes.md +0 -216
  137. data/Gemfile +0 -8
  138. data/LICENSE +0 -9
  139. data/Pro-2.0-Upgrade.md +0 -138
  140. data/Pro-3.0-Upgrade.md +0 -44
  141. data/Pro-4.0-Upgrade.md +0 -35
  142. data/Pro-Changes.md +0 -729
  143. data/Rakefile +0 -8
  144. data/bin/sidekiqctl +0 -99
  145. data/code_of_conduct.md +0 -50
  146. data/lib/generators/sidekiq/worker_generator.rb +0 -49
  147. data/lib/sidekiq/core_ext.rb +0 -1
  148. data/lib/sidekiq/delay.rb +0 -42
  149. data/lib/sidekiq/exception_handler.rb +0 -29
  150. data/lib/sidekiq/extensions/action_mailer.rb +0 -57
  151. data/lib/sidekiq/extensions/active_record.rb +0 -40
  152. data/lib/sidekiq/extensions/class_methods.rb +0 -40
  153. data/lib/sidekiq/extensions/generic_proxy.rb +0 -31
  154. data/lib/sidekiq/logging.rb +0 -122
  155. data/lib/sidekiq/middleware/server/active_record.rb +0 -23
  156. data/lib/sidekiq/util.rb +0 -66
  157. data/lib/sidekiq/worker.rb +0 -204
data/Pro-Changes.md DELETED
@@ -1,729 +0,0 @@
1
- # Sidekiq Pro Changelog
2
-
3
- [Sidekiq Changes](https://github.com/mperham/sidekiq/blob/master/Changes.md) | [Sidekiq Pro Changes](https://github.com/mperham/sidekiq/blob/master/Pro-Changes.md) | [Sidekiq Enterprise Changes](https://github.com/mperham/sidekiq/blob/master/Ent-Changes.md)
4
-
5
- Please see [http://sidekiq.org/](http://sidekiq.org/) for more details and how to buy.
6
-
7
- 4.0.2
8
- ---------
9
-
10
- - Remove super\_fetch edge case leading to an unnecessary `sleep(1)`
11
- call and resulting latency [#3790]
12
- - Fix possible bad statsd metric call on super\_fetch startup
13
- - Remove superfluous `freeze` calls on Strings [#3759]
14
-
15
- 4.0.1
16
- ---------
17
-
18
- - Fix incompatibility with the statsd-ruby gem [#3740]
19
-
20
- 4.0.0
21
- ---------
22
-
23
- - See the [Sidekiq Pro 4.0](Pro-4.0-Upgrade.md) release notes.
24
-
25
-
26
- 3.7.1
27
- ---------
28
-
29
- - Deprecate timed\_fetch. Switch to super\_fetch:
30
- ```ruby
31
- config.super_fetch!
32
- ```
33
-
34
-
35
- 3.7.0
36
- ---------
37
-
38
- - Refactor batch job success/failure to gracefully handle several edge
39
- cases with regard to Sidekiq::Shutdown. This should greatly reduce
40
- the chances of seeing the long-standing "negative pending count" problem. [#3710]
41
-
42
-
43
- 3.6.1
44
- ---------
45
-
46
- - Add support for Datadog::Statsd, it is the recommended Statsd client. [#3699]
47
- ```ruby
48
- Sidekiq::Pro.dogstatsd = ->{ Datadog::Statsd.new("metrics.example.com", 8125) }
49
- ```
50
- - Size the statsd connection pool based on Sidekiq's concurrency [#3700]
51
-
52
-
53
- 3.6.0
54
- ---------
55
-
56
- This release overhauls the Statsd metrics support and adds more
57
- metrics for tracking Pro feature usage. In your initializer:
58
- ```ruby
59
- Sidekiq::Pro.statsd = ->{ ::Statsd.new("127.0.0.1", 8125) }
60
- ```
61
- Sidekiq Pro will emit more metrics to Statsd:
62
- ```
63
- jobs.expired - when a job is expired
64
- jobs.recovered.push - when a job is recovered by reliable_push after network outage
65
- jobs.recovered.fetch - when a job is recovered by super_fetch after process crash
66
- batch.created - when a batch is created
67
- batch.complete - when a batch is completed
68
- batch.success - when a batch is successful
69
- ```
70
- Sidekiq Pro's existing Statsd middleware has been rewritten to leverage the new API.
71
- Everything should be backwards compatible with one deprecation notice.
72
-
73
-
74
- 3.5.4
75
- ---------
76
-
77
- - Fix case in SuperFetch where Redis downtime can lead to processor thread death [#3684]
78
- - Fix case where TimedFetch might not recover some pending jobs
79
- - Fix edge case in Batch::Status#poll leading to premature completion [#3640]
80
- - Adjust scan API to check 100 elements at a time, to minimize network round trips
81
- when scanning large sets.
82
-
83
- 3.5.3
84
- ---------
85
-
86
- - Restore error check for super\_fetch's job ack [#3601]
87
- - Trim error messages saved in Batch's failure hash, preventing huge
88
- messages from bloating Redis. [#3570]
89
-
90
- 3.5.2
91
- ---------
92
-
93
- - Fix `Status#completed?` when run against a Batch that had succeeded
94
- and was deleted. [#3519]
95
-
96
- 3.5.1
97
- ---------
98
-
99
- - Work with Sidekiq 5.0.2+
100
- - Improve performance of super\_fetch with weighted queues [#3489]
101
-
102
- 3.5.0
103
- ---------
104
-
105
- - Add queue pause/unpause endpoints for scripting via curl [#3445]
106
- - Change how super\_fetch names private queues to avoid hostname/queue clashes. [#3443]
107
- - Re-implement `Sidekiq::Queue#delete_job` to avoid O(n) runtime [#3408]
108
- - Batch page displays Pending JIDs if less than 10 [#3130]
109
- - Batch page has a Search button to find associated Retries [#3130]
110
- - Make Batch UI progress bar more friendly to the colorblind [#3387]
111
-
112
- 3.4.5
113
- ---------
114
-
115
- - Fix potential job loss with reliable scheduler when lots of jobs are scheduled
116
- at precisely the same time. Thanks to raivil for his hard work in
117
- reproducing the bug. [#3371]
118
-
119
- 3.4.4
120
- ---------
121
-
122
- - Optimize super\_fetch shutdown to restart jobs quicker [#3249]
123
-
124
- 3.4.3
125
- ---------
126
-
127
- - Limit reliable scheduler to enqueue up to 100 jobs per call, minimizing Redis latency [#3332]
128
- - Fix bug in super\_fetch logic for queues with `_` in the name [#3339]
129
-
130
- 3.4.2
131
- ---------
132
-
133
- - Add `Batch::Status#invalidated?` API which returns true if any/all
134
- JIDs were invalidated within the batch. [#3326]
135
-
136
- 3.4.1
137
- ---------
138
-
139
- - Allow super\_fetch's orphan job check to happen as often as every hour [#3273]
140
- - Officially deprecate reliable\_fetch algorithm, I now recommend you use `super_fetch` instead:
141
- ```ruby
142
- Sidekiq.configure_server do |config|
143
- config.super_fetch!
144
- end
145
- ```
146
- Also note that Sidekiq's `-i/--index` option is no longer used/relevant with super\_fetch.
147
- - Don't display "Delete/Retry All" buttons when filtering in Web UI [#3243]
148
- - Reimplement Sidekiq::JobSet#find\_job with ZSCAN [#3197]
149
-
150
- 3.4.0
151
- ---------
152
-
153
- - Introducing the newest reliable fetching algorithm: `super_fetch`! This
154
- algorithm will replace reliable\_fetch in Pro 4.0. super\_fetch is
155
- bullet-proof across all environments, no longer requiring stable
156
- hostnames or an index to be set per-process. [#3077]
157
- ```ruby
158
- Sidekiq.configure_server do |config|
159
- config.super_fetch!
160
- end
161
- ```
162
- Thank you to @jonhyman for code review and the Sidekiq Pro customers that
163
- beta tested super\_fetch.
164
-
165
- 3.3.3
166
- ---------
167
-
168
- - Update Web UI extension to work with Sidekiq 4.2.0's new Web UI. [#3075]
169
-
170
- 3.3.2
171
- ---------
172
-
173
- - Minimize batch memory usage after success [#3083]
174
- - Extract batch's 24 hr linger expiry to a LINGER constant so it can be tuned. [#3011]
175
-
176
- 3.3.1
177
- ---------
178
-
179
- - If environment is unset, treat it as development so reliable\_fetch works as before 3.2.2.
180
-
181
- 3.3.0
182
- ---------
183
-
184
- - Don't delete batches immediately upon success but set a 24 hr expiry, this allows
185
- Sidekiq::Batch::Status#poll to work, even after batch success. [#3011]
186
- - New `Sidekiq::PendingSet#destroy(jid)` API to remove poison pill jobs [#3015]
187
-
188
- 3.2.2
189
- ---------
190
-
191
- - A default value for -i is only set in development now, staging or
192
- other environments must set an index if you wish to use reliable\_fetch. [#2971]
193
- - Fix nil dereference when checking for jobs over timeout in timed\_fetch
194
-
195
-
196
- 3.2.1
197
- ---------
198
-
199
- - timed\_fetch now works with namespaces. [ryansch]
200
-
201
-
202
- 3.2.0
203
- ---------
204
-
205
- - Fixed detection of missing batches, `NoSuchBatch` should be raised
206
- properly now if `Sidekiq::Batch.new(bid)` is called on a batch no
207
- longer in Redis.
208
- - Remove support for Pro 1.x format batches. This version will no
209
- longer seamlessly process batches created with Sidekiq Pro 1.x.
210
- As always, upgrade one major version at a time to ensure a smooth
211
- transition.
212
- - Fix edge case where a parent batch could expire before a child batch
213
- was finished processing, leading to missing batches [#2889]
214
-
215
- 2.1.5
216
- ---------
217
-
218
- - Fix edge case where a parent batch could expire before a child batch
219
- was finished processing, leading to missing batches [#2889]
220
-
221
- 3.1.0
222
- ---------
223
-
224
- - New container-friendly fetch algorithm: `timed_fetch`. See the
225
- [wiki documentation](https://github.com/mperham/sidekiq/wiki/Pro-Reliability-Server)
226
- for trade offs between the two reliability options. You should
227
- use this if you are on Heroku, Docker, Amazon ECS or EBS or
228
- another container-based system.
229
-
230
-
231
- 3.0.6
232
- ---------
233
-
234
- - Fix race condition on reliable fetch shutdown
235
-
236
- 3.0.5
237
- ---------
238
-
239
- - Statsd metrics now account for ActiveJob class names
240
- - Allow reliable fetch internals to be overridden [jonhyman]
241
-
242
- 3.0.4
243
- ---------
244
-
245
- - Queue pausing no longer requires reliable fetch. [#2786]
246
-
247
- 3.0.3, 2.1.4
248
- ------------
249
-
250
- - Convert Lua-based `Sidekiq::Queue#delete_by_class` to Ruby-based, to
251
- avoid O(N^2) performance and possible Redis failure. [#2806]
252
-
253
- 3.0.2
254
- -----------
255
-
256
- - Make job registration with batch part of the atomic push so batch
257
- metadata can't get out of sync with the job data. [#2714]
258
-
259
- 3.0.1
260
- -----------
261
-
262
- - Remove a number of Redis version checks since we can assume 2.8+ now.
263
- - Fix expiring jobs client middleware not loaded on server
264
-
265
- 3.0.0
266
- -----------
267
-
268
- - See the [Pro 3.0 release notes](Pro-3.0-Upgrade.md).
269
-
270
- 2.1.3
271
- -----------
272
-
273
- - Don't enable strict priority if using weighted queueing like `-q a,1 -q b,1`
274
- - Safer JSON mangling in Lua [#2639]
275
-
276
- 2.1.2
277
- -----------
278
-
279
- - Lock Sidekiq Pro 2.x to Sidekiq 3.x.
280
-
281
- 2.1.1
282
- -----------
283
-
284
- - Make ShardSet lazier so Redis can first be initialized at startup. [#2603]
285
-
286
-
287
- 2.1.0
288
- -----------
289
-
290
- - Explicit support for sharding batches. You list your Redis shards and
291
- Sidekiq Pro will randomly spread batches across the shards. The BID
292
- will indicate which shard contains the batch data. Jobs within a
293
- batch may be spread across all shards too. [#2548, jonhyman]
294
- - Officially deprecate Sidekiq::Notifications code. Notifications have
295
- been undocumented for months now. [#2575]
296
-
297
-
298
- 2.0.8
299
- -----------
300
-
301
- - Fix reliable scheduler mangling large numeric arguments. Lua's CJSON
302
- library cannot accurately encode numbers larger than 14 digits! [#2478]
303
-
304
- 2.0.7
305
- -----------
306
-
307
- - Optimize delete of enormous batches (100,000s of jobs) [#2458]
308
-
309
- 2.0.6, 1.9.3
310
- --------------
311
-
312
- - CSRF protection in Sidekiq 3.4.2 broke job filtering in the Web UI [#2442]
313
- - Sidekiq Pro 1.x is now limited to Sidekiq < 3.5.0.
314
-
315
- 2.0.5
316
- -----------
317
-
318
- - Atomic scheduler now sets `enqueued_at` [#2414]
319
- - Batches now account for jobs which are stopped by client middleware [#2406]
320
- - Ignore redundant calls to `Sidekiq::Client.reliable_push!` [#2408]
321
-
322
- 2.0.4
323
- -----------
324
-
325
- - Reliable push now supports sharding [#2409]
326
- - Reliable push now only catches Redis exceptions [#2307]
327
-
328
- 2.0.3
329
- -----------
330
-
331
- - Display Batch callback data on the Batch details page. [#2347]
332
- - Fix incompatibility with Pro Web and Rack middleware. [#2344] Thank
333
- you to Jason Clark for the tip on how to fix it.
334
-
335
- 2.0.2
336
- -----------
337
-
338
- - Multiple Web UIs can now run in the same process. [#2267] If you have
339
- multiple Redis shards, you can mount UIs for all in the same process:
340
- ```ruby
341
- POOL1 = ConnectionPool.new { Redis.new(:url => "redis://localhost:6379/0") }
342
- POOL2 = ConnectionPool.new { Redis.new(:url => "redis://localhost:6378/0") }
343
-
344
- mount Sidekiq::Pro::Web => '/sidekiq' # default
345
- mount Sidekiq::Pro::Web.with(redis_pool: POOL1), at: '/sidekiq1', as: 'sidekiq1' # shard1
346
- mount Sidekiq::Pro::Web.with(redis_pool: POOL2), at: '/sidekiq2', as: 'sidekiq2' # shard2
347
- ```
348
- - **SECURITY** Fix batch XSS in error data. Thanks to moneybird.com for
349
- reporting the issue.
350
-
351
- 2.0.1
352
- -----------
353
-
354
- - Add `batch.callback_queue` so batch callbacks can use a higher
355
- priority queue than jobs. [#2200]
356
- - Gracefully recover if someone runs `SCRIPT FLUSH` on Redis. [#2240]
357
- - Ignore errors when attempting `bulk_requeue`, allowing clean shutdown
358
-
359
- 2.0.0
360
- -----------
361
-
362
- - See [the Upgrade Notes](Pro-2.0-Upgrade.md) for detailed notes.
363
-
364
- 1.9.2
365
- -----------
366
-
367
- - As of 1/1/2015, Sidekiq Pro is hosted on a new dedicated server.
368
- Happy new year and let's hope for 100% uptime!
369
- - Fix bug in reliable\_fetch where jobs could be duplicated if a Sidekiq
370
- process crashed and you were using weighted queues. [#2120]
371
-
372
- 1.9.1
373
- -----------
374
-
375
- - **SECURITY** Fix XSS in batch description, thanks to intercom.io for reporting the
376
- issue. If you don't use batch descriptions, you don't need the fix.
377
-
378
- 1.9.0
379
- -----------
380
-
381
- - Add new expiring jobs feature [#1982]
382
- - Show batch expiration on Batch details page [#1981]
383
- - Add '$' batch success token to the pubsub support. [#1953]
384
-
385
-
386
- 1.8.0
387
- -----------
388
-
389
- - Fix race condition where Batches can complete
390
- before they have been fully defined or only half-defined. Requires
391
- Sidekiq 3.2.3. [#1919]
392
-
393
-
394
- 1.7.6
395
- -----------
396
-
397
- - Quick release to verify #1919
398
-
399
-
400
- 1.7.5
401
- -----------
402
-
403
- - Fix job filtering within the Dead tab.
404
- - Add APIs and wiki documentation for invalidating jobs within a batch.
405
-
406
-
407
- 1.7.4
408
- -----------
409
-
410
- - Awesome ANSI art startup banner!
411
-
412
-
413
- 1.7.3
414
- -----------
415
-
416
- - Batch callbacks should use the same queue as the associated jobs.
417
-
418
- 1.7.2
419
- -----------
420
-
421
- - **DEPRECATION** Use `Batch#on(:complete)` instead of `Batch#notify`.
422
- The specific Campfire, HipChat, email and other notification schemes
423
- will be removed in 2.0.0.
424
- - Remove batch from UI when successful. [#1745]
425
- - Convert batch callbacks to be asynchronous jobs for error handling [#1744]
426
-
427
- 1.7.1
428
- -----------
429
-
430
- - Fix for paused queues being processed for a few seconds when starting
431
- a new Sidekiq process.
432
- - Add a 5 sec delay when starting reliable fetch on Heroku to minimize
433
- any duplicate job processing with another process shutting down.
434
-
435
- 1.7.0
436
- -----------
437
-
438
- - Add ability to pause reliable queues via API.
439
- ```ruby
440
- q = Sidekiq::Queue.new("critical")
441
- q.pause!
442
- q.paused? # => true
443
- q.unpause!
444
- ```
445
-
446
- Sidekiq polls Redis every 10 seconds for paused queues so pausing will take
447
- a few seconds to take effect.
448
-
449
- 1.6.0
450
- -----------
451
-
452
- - Compatible with Sidekiq 3.
453
-
454
- 1.5.1
455
- -----------
456
-
457
- - Due to a breaking API change in Sidekiq 3.0, this version is limited
458
- to Sidekiq 2.x.
459
-
460
- 1.5.0
461
- -----------
462
-
463
- - Fix issue on Heroku where reliable fetch could orphan jobs [#1573]
464
-
465
-
466
- 1.4.3
467
- -----------
468
-
469
- - Reverse sorting of Batches in Web UI [#1098]
470
- - Refactoring for Sidekiq 3.0, Pro now requires Sidekiq 2.17.5
471
-
472
- 1.4.2
473
- -----------
474
-
475
- - Tolerate expired Batches in the web UI.
476
- - Fix 100% CPU usage when using weighted queues and reliable fetch.
477
-
478
- 1.4.1
479
- -----------
480
-
481
- - Add batch progress bar to batch detail page. [#1398]
482
- - Fix race condition in initializing Lua scripts
483
-
484
-
485
- 1.4.0
486
- -----------
487
-
488
- - Default batch expiration has been extended to 3 days, from 1 day previously.
489
- - Batches now sort in the Web UI according to expiry time, not creation time.
490
- - Add user-configurable batch expiry. If your batches might take longer
491
- than 72 hours to process, you can extend the expiration date.
492
-
493
- ```ruby
494
- b = Sidekiq::Batch.new
495
- b.expires_in 5.days
496
- ...
497
- ```
498
-
499
- 1.3.2
500
- -----------
501
-
502
- - Lazy load Lua scripts so a Redis connection is not required on bootup.
503
-
504
- 1.3.1
505
- -----------
506
-
507
- - Fix a gemspec packaging issue which broke the Batch UI.
508
-
509
- 1.3.0
510
- -----------
511
-
512
- Thanks to @jonhyman for his contributions to this Sidekiq Pro release.
513
-
514
- This release includes new functionality based on the SCAN command newly
515
- added to Redis 2.8. Pro still works with Redis 2.4 but some
516
- functionality will be unavailable.
517
-
518
- - Job Filtering in the Web UI!
519
- You can now filter retries and scheduled jobs in the Web UI so you
520
- only see the jobs relevant to your needs. Queues cannot be filtered;
521
- Redis does not provide the same SCAN operation on the LIST type.
522
- **Redis 2.8**
523
- ![Filtering](https://f.cloud.github.com/assets/2911/1619465/f47529f2-5657-11e3-8cd1-33899eb72aad.png)
524
- - SCAN support in the Sidekiq::SortedSet API. Here's an example that
525
- finds all jobs which contain the substring "Warehouse::OrderShip"
526
- and deletes all matching retries. If the set is large, this API
527
- will be **MUCH** faster than standard iteration using each.
528
- **Redis 2.8**
529
- ```ruby
530
- Sidekiq::RetrySet.new.scan("Warehouse::OrderShip") do |job|
531
- job.delete
532
- end
533
- ```
534
-
535
- - Sidekiq::Batch#jobs now returns the set of JIDs added to the batch.
536
- - Sidekiq::Batch#jids returns the complete set of JIDs associated with the batch.
537
- - Sidekiq::Batch#remove\_jobs(jid, jid, ...) removes JIDs from the set, allowing early termination of jobs if they become irrelevant according to application logic.
538
- - Sidekiq::Batch#include?(jid) allows jobs to check if they are still
539
- relevant to a Batch and exit early if not.
540
- - Sidekiq::SortedSet#find\_job(jid) now uses server-side Lua if possible **Redis 2.6** [jonhyman]
541
- - The statsd integration now sets global job counts:
542
- ```ruby
543
- jobs.count
544
- jobs.success
545
- jobs.failure
546
- ```
547
-
548
- - Change shutdown logic to push leftover jobs in the private queue back
549
- into the public queue when shutting down with Reliable Fetch. This
550
- allows the safe decommission of a Sidekiq Pro process when autoscaling. [jonhyman]
551
- - Add support for weighted random fetching with Reliable Fetch [jonhyman]
552
- - Pro now requires Sidekiq 2.17.0
553
-
554
- 1.2.5
555
- -----------
556
-
557
- - Convert Batch UI to use Sidekiq 2.16's support for extension localization.
558
- - Update reliable\_push to work with Sidekiq::Client refactoring in 2.16
559
- - Pro now requires Sidekiq 2.16.0
560
-
561
- 1.2.4
562
- -----------
563
-
564
- - Convert Batch UI to Bootstrap 3
565
- - Pro now requires Sidekiq 2.15.0
566
- - Add Sidekiq::Batch::Status#delete [#1205]
567
-
568
- 1.2.3
569
- -----------
570
-
571
- - Pro now requires Sidekiq 2.14.0
572
- - Fix bad exception handling in batch callbacks [#1134]
573
- - Convert Batch UI to ERB
574
-
575
- 1.2.2
576
- -----------
577
-
578
- - Problem with reliable fetch which could lead to lost jobs when Sidekiq
579
- is shut down normally. Thanks to MikaelAmborn for the report. [#1109]
580
-
581
- 1.2.1
582
- -----------
583
-
584
- - Forgot to push paging code necessary for `delete_job` performance.
585
-
586
- 1.2.0
587
- -----------
588
-
589
- - **LEAK** Fix batch key which didn't expire in Redis. Keys match
590
- /b-[a-f0-9]{16}-pending/, e.g. "b-4f55163ddba10aa0-pending" [#1057]
591
- - **Reliable fetch now supports multiple queues**, using the algorithm spec'd
592
- by @jackrg [#1102]
593
- - Fix issue with reliable\_push where it didn't return the JID for a pushed
594
- job when sending previously cached jobs to Redis.
595
- - Add fast Sidekiq::Queue#delete\_job(jid) API which leverages Lua so job lookup is
596
- 100% server-side. Benchmark vs Sidekiq's Job#delete API. **Redis 2.6**
597
-
598
- ```
599
- Sidekiq Pro API
600
- 0.030000 0.020000 0.050000 ( 1.640659)
601
- Sidekiq API
602
- 17.250000 2.220000 19.470000 ( 22.193300)
603
- ```
604
-
605
- - Add fast Sidekiq::Queue#delete\_by\_class(klass) API to remove all
606
- jobs of a given type. Uses server-side Lua for performance. **Redis 2.6**
607
-
608
- 1.1.0
609
- -----------
610
-
611
- - New `sidekiq/pro/reliable_push` which makes Sidekiq::Client resiliant
612
- to Redis network failures. [#793]
613
- - Move `sidekiq/reliable_fetch` to `sidekiq/pro/reliable_fetch`
614
-
615
-
616
- 1.0.0
617
- -----------
618
-
619
- - Sidekiq Pro changelog moved to mperham/sidekiq for public visibility.
620
- - Add new Rack endpoint for easy polling of batch status via JavaScript. See `sidekiq/rack/batch_status`
621
-
622
- 0.9.3
623
- -----------
624
-
625
- - Fix bad /batches path in Web UI
626
- - Fix Sinatra conflict with sidekiq-failures
627
-
628
- 0.9.2
629
- -----------
630
-
631
- - Fix issue with lifecycle notifications not firing.
632
-
633
- 0.9.1
634
- -----------
635
-
636
- - Update due to Sidekiq API changes.
637
-
638
- 0.9.0
639
- -----------
640
-
641
- - Rearchitect Sidekiq's Fetch code to support different fetch
642
- strategies. Add a ReliableFetch strategy which works with Redis'
643
- RPOPLPUSH to ensure we don't lose messages, even when the Sidekiq
644
- process crashes unexpectedly. [mperham/sidekiq#607]
645
-
646
- 0.8.2
647
- -----------
648
-
649
- - Reimplement existing notifications using batch on_complete events.
650
-
651
- 0.8.1
652
- -----------
653
-
654
- - Rejigger batch callback notifications.
655
-
656
-
657
- 0.8.0
658
- -----------
659
-
660
- - Add new Batch 'callback' notification support, for in-process
661
- notification.
662
- - Symbolize option keys passed to Pony [mperham/sidekiq#603]
663
- - Batch no longer requires the Web UI since Web UI usage is optional.
664
- You must require is manually in your Web process:
665
-
666
- ```ruby
667
- require 'sidekiq/web'
668
- require 'sidekiq/batch/web'
669
- mount Sidekiq::Web => '/sidekiq'
670
- ```
671
-
672
-
673
- 0.7.1
674
- -----------
675
-
676
- - Worker instances can access the associated jid and bid via simple
677
- accessors.
678
- - Batches can now be modified while being processed so, e.g. a batch
679
- job can add additional jobs to its own batch.
680
-
681
- ```ruby
682
- def perform(...)
683
- batch = Sidekiq::Batch.new(bid) # instantiate batch associated with this job
684
- batch.jobs do
685
- SomeWorker.perform_async # add another job
686
- end
687
- end
688
- ```
689
-
690
- - Save error backtraces in batch's failure info for display in Web UI.
691
- - Clean up email notification a bit.
692
-
693
-
694
- 0.7.0
695
- -----------
696
-
697
- - Add optional batch description
698
- - Mutable batches. Batches can now be modified to add additional jobs
699
- at runtime. Example would be a batch job which needs to create more
700
- jobs based on the data it is processing.
701
-
702
- ```ruby
703
- batch = Sidekiq::Batch.new(bid)
704
- batch.jobs do
705
- # define more jobs here
706
- end
707
- ```
708
- - Fix issues with symbols vs strings in option hashes
709
-
710
-
711
- 0.6.1
712
- -----------
713
-
714
- - Webhook notification support
715
-
716
-
717
- 0.6
718
- -----------
719
-
720
- - Redis pubsub
721
- - Email polish
722
-
723
-
724
- 0.5
725
- -----------
726
-
727
- - Batches
728
- - Notifications
729
- - Statsd middleware