sidekiq 4.2.10 → 7.3.2

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