sidekiq 5.1.1 → 7.1.2

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