sidekiq 3.4.1 → 7.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (235) hide show
  1. checksums.yaml +5 -5
  2. data/Changes.md +1118 -4
  3. data/LICENSE.txt +9 -0
  4. data/README.md +55 -47
  5. data/bin/multi_queue_bench +271 -0
  6. data/bin/sidekiq +26 -3
  7. data/bin/sidekiqload +247 -0
  8. data/bin/sidekiqmon +11 -0
  9. data/lib/generators/sidekiq/job_generator.rb +57 -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/job_test.rb.erb +8 -0
  13. data/lib/sidekiq/api.rb +714 -312
  14. data/lib/sidekiq/capsule.rb +130 -0
  15. data/lib/sidekiq/cli.rb +275 -241
  16. data/lib/sidekiq/client.rb +141 -110
  17. data/lib/sidekiq/component.rb +68 -0
  18. data/lib/sidekiq/config.rb +291 -0
  19. data/lib/sidekiq/deploy.rb +62 -0
  20. data/lib/sidekiq/embedded.rb +61 -0
  21. data/lib/sidekiq/fetch.rb +53 -121
  22. data/lib/sidekiq/iterable_job.rb +53 -0
  23. data/lib/sidekiq/job/interrupt_handler.rb +22 -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 +64 -0
  30. data/lib/sidekiq/job_retry.rb +305 -0
  31. data/lib/sidekiq/job_util.rb +107 -0
  32. data/lib/sidekiq/launcher.rb +241 -66
  33. data/lib/sidekiq/logger.rb +131 -0
  34. data/lib/sidekiq/manager.rb +91 -192
  35. data/lib/sidekiq/metrics/query.rb +156 -0
  36. data/lib/sidekiq/metrics/shared.rb +95 -0
  37. data/lib/sidekiq/metrics/tracking.rb +140 -0
  38. data/lib/sidekiq/middleware/chain.rb +114 -56
  39. data/lib/sidekiq/middleware/current_attributes.rb +111 -0
  40. data/lib/sidekiq/middleware/i18n.rb +8 -7
  41. data/lib/sidekiq/middleware/modules.rb +21 -0
  42. data/lib/sidekiq/monitor.rb +146 -0
  43. data/lib/sidekiq/paginator.rb +29 -16
  44. data/lib/sidekiq/processor.rb +248 -112
  45. data/lib/sidekiq/rails.rb +61 -27
  46. data/lib/sidekiq/redis_client_adapter.rb +114 -0
  47. data/lib/sidekiq/redis_connection.rb +68 -48
  48. data/lib/sidekiq/ring_buffer.rb +29 -0
  49. data/lib/sidekiq/scheduled.rb +173 -52
  50. data/lib/sidekiq/sd_notify.rb +149 -0
  51. data/lib/sidekiq/systemd.rb +24 -0
  52. data/lib/sidekiq/testing/inline.rb +7 -5
  53. data/lib/sidekiq/testing.rb +206 -65
  54. data/lib/sidekiq/transaction_aware_client.rb +51 -0
  55. data/lib/sidekiq/version.rb +4 -1
  56. data/lib/sidekiq/web/action.rb +99 -0
  57. data/lib/sidekiq/web/application.rb +479 -0
  58. data/lib/sidekiq/web/csrf_protection.rb +183 -0
  59. data/lib/sidekiq/web/helpers.rb +415 -0
  60. data/lib/sidekiq/web/router.rb +104 -0
  61. data/lib/sidekiq/web.rb +158 -200
  62. data/lib/sidekiq/worker_compatibility_alias.rb +13 -0
  63. data/lib/sidekiq.rb +100 -132
  64. data/sidekiq.gemspec +27 -23
  65. data/web/assets/images/apple-touch-icon.png +0 -0
  66. data/web/assets/images/favicon.ico +0 -0
  67. data/web/assets/javascripts/application.js +177 -72
  68. data/web/assets/javascripts/base-charts.js +106 -0
  69. data/web/assets/javascripts/chart.min.js +13 -0
  70. data/web/assets/javascripts/chartjs-plugin-annotation.min.js +7 -0
  71. data/web/assets/javascripts/dashboard-charts.js +192 -0
  72. data/web/assets/javascripts/dashboard.js +37 -286
  73. data/web/assets/javascripts/metrics.js +298 -0
  74. data/web/assets/stylesheets/application-dark.css +147 -0
  75. data/web/assets/stylesheets/application-rtl.css +163 -0
  76. data/web/assets/stylesheets/application.css +228 -247
  77. data/web/assets/stylesheets/bootstrap-rtl.min.css +9 -0
  78. data/web/assets/stylesheets/bootstrap.css +4 -8
  79. data/web/locales/ar.yml +87 -0
  80. data/web/locales/cs.yml +62 -52
  81. data/web/locales/da.yml +60 -53
  82. data/web/locales/de.yml +65 -53
  83. data/web/locales/el.yml +43 -24
  84. data/web/locales/en.yml +86 -61
  85. data/web/locales/es.yml +70 -53
  86. data/web/locales/fa.yml +80 -0
  87. data/web/locales/fr.yml +86 -56
  88. data/web/locales/gd.yml +99 -0
  89. data/web/locales/he.yml +80 -0
  90. data/web/locales/hi.yml +59 -59
  91. data/web/locales/it.yml +53 -53
  92. data/web/locales/ja.yml +78 -56
  93. data/web/locales/ko.yml +52 -52
  94. data/web/locales/lt.yml +83 -0
  95. data/web/locales/{no.yml → nb.yml} +62 -54
  96. data/web/locales/nl.yml +52 -52
  97. data/web/locales/pl.yml +45 -45
  98. data/web/locales/pt-br.yml +83 -55
  99. data/web/locales/pt.yml +51 -51
  100. data/web/locales/ru.yml +68 -60
  101. data/web/locales/sv.yml +53 -53
  102. data/web/locales/ta.yml +60 -60
  103. data/web/locales/tr.yml +101 -0
  104. data/web/locales/uk.yml +77 -0
  105. data/web/locales/ur.yml +80 -0
  106. data/web/locales/vi.yml +83 -0
  107. data/web/locales/zh-cn.yml +43 -16
  108. data/web/locales/zh-tw.yml +42 -8
  109. data/web/views/_footer.erb +22 -9
  110. data/web/views/_job_info.erb +27 -6
  111. data/web/views/_metrics_period_select.erb +12 -0
  112. data/web/views/_nav.erb +8 -22
  113. data/web/views/_paging.erb +3 -1
  114. data/web/views/_poll_link.erb +4 -0
  115. data/web/views/_summary.erb +7 -7
  116. data/web/views/busy.erb +91 -31
  117. data/web/views/dashboard.erb +52 -22
  118. data/web/views/dead.erb +5 -4
  119. data/web/views/filtering.erb +7 -0
  120. data/web/views/layout.erb +19 -7
  121. data/web/views/metrics.erb +91 -0
  122. data/web/views/metrics_for_job.erb +59 -0
  123. data/web/views/morgue.erb +26 -20
  124. data/web/views/queue.erb +36 -25
  125. data/web/views/queues.erb +24 -7
  126. data/web/views/retries.erb +29 -21
  127. data/web/views/retry.erb +6 -5
  128. data/web/views/scheduled.erb +20 -17
  129. data/web/views/scheduled_job_info.erb +2 -1
  130. metadata +101 -232
  131. data/.gitignore +0 -12
  132. data/.travis.yml +0 -16
  133. data/3.0-Upgrade.md +0 -70
  134. data/COMM-LICENSE +0 -85
  135. data/Contributing.md +0 -32
  136. data/Gemfile +0 -22
  137. data/LICENSE +0 -9
  138. data/Pro-2.0-Upgrade.md +0 -138
  139. data/Pro-Changes.md +0 -412
  140. data/Rakefile +0 -9
  141. data/bin/sidekiqctl +0 -93
  142. data/lib/generators/sidekiq/templates/worker_spec.rb.erb +0 -6
  143. data/lib/generators/sidekiq/templates/worker_test.rb.erb +0 -8
  144. data/lib/generators/sidekiq/worker_generator.rb +0 -49
  145. data/lib/sidekiq/actor.rb +0 -39
  146. data/lib/sidekiq/core_ext.rb +0 -105
  147. data/lib/sidekiq/exception_handler.rb +0 -30
  148. data/lib/sidekiq/extensions/action_mailer.rb +0 -56
  149. data/lib/sidekiq/extensions/active_record.rb +0 -39
  150. data/lib/sidekiq/extensions/class_methods.rb +0 -39
  151. data/lib/sidekiq/extensions/generic_proxy.rb +0 -24
  152. data/lib/sidekiq/logging.rb +0 -104
  153. data/lib/sidekiq/middleware/server/active_record.rb +0 -13
  154. data/lib/sidekiq/middleware/server/logging.rb +0 -35
  155. data/lib/sidekiq/middleware/server/retry_jobs.rb +0 -206
  156. data/lib/sidekiq/util.rb +0 -55
  157. data/lib/sidekiq/web_helpers.rb +0 -234
  158. data/lib/sidekiq/worker.rb +0 -89
  159. data/test/config.yml +0 -9
  160. data/test/env_based_config.yml +0 -11
  161. data/test/fake_env.rb +0 -0
  162. data/test/fixtures/en.yml +0 -2
  163. data/test/helper.rb +0 -39
  164. data/test/test_api.rb +0 -494
  165. data/test/test_cli.rb +0 -365
  166. data/test/test_client.rb +0 -269
  167. data/test/test_exception_handler.rb +0 -55
  168. data/test/test_extensions.rb +0 -120
  169. data/test/test_fetch.rb +0 -104
  170. data/test/test_logging.rb +0 -34
  171. data/test/test_manager.rb +0 -164
  172. data/test/test_middleware.rb +0 -159
  173. data/test/test_processor.rb +0 -166
  174. data/test/test_redis_connection.rb +0 -127
  175. data/test/test_retry.rb +0 -373
  176. data/test/test_scheduled.rb +0 -120
  177. data/test/test_scheduling.rb +0 -71
  178. data/test/test_sidekiq.rb +0 -69
  179. data/test/test_testing.rb +0 -82
  180. data/test/test_testing_fake.rb +0 -271
  181. data/test/test_testing_inline.rb +0 -93
  182. data/test/test_web.rb +0 -594
  183. data/test/test_web_helpers.rb +0 -52
  184. data/test/test_worker_generator.rb +0 -17
  185. data/web/assets/images/bootstrap/glyphicons-halflings-white.png +0 -0
  186. data/web/assets/images/bootstrap/glyphicons-halflings.png +0 -0
  187. data/web/assets/images/status/active.png +0 -0
  188. data/web/assets/images/status/idle.png +0 -0
  189. data/web/assets/javascripts/locales/README.md +0 -27
  190. data/web/assets/javascripts/locales/jquery.timeago.ar.js +0 -96
  191. data/web/assets/javascripts/locales/jquery.timeago.bg.js +0 -18
  192. data/web/assets/javascripts/locales/jquery.timeago.bs.js +0 -49
  193. data/web/assets/javascripts/locales/jquery.timeago.ca.js +0 -18
  194. data/web/assets/javascripts/locales/jquery.timeago.cs.js +0 -18
  195. data/web/assets/javascripts/locales/jquery.timeago.cy.js +0 -20
  196. data/web/assets/javascripts/locales/jquery.timeago.da.js +0 -18
  197. data/web/assets/javascripts/locales/jquery.timeago.de.js +0 -18
  198. data/web/assets/javascripts/locales/jquery.timeago.el.js +0 -18
  199. data/web/assets/javascripts/locales/jquery.timeago.en-short.js +0 -20
  200. data/web/assets/javascripts/locales/jquery.timeago.en.js +0 -20
  201. data/web/assets/javascripts/locales/jquery.timeago.es.js +0 -18
  202. data/web/assets/javascripts/locales/jquery.timeago.et.js +0 -18
  203. data/web/assets/javascripts/locales/jquery.timeago.fa.js +0 -22
  204. data/web/assets/javascripts/locales/jquery.timeago.fi.js +0 -28
  205. data/web/assets/javascripts/locales/jquery.timeago.fr-short.js +0 -16
  206. data/web/assets/javascripts/locales/jquery.timeago.fr.js +0 -17
  207. data/web/assets/javascripts/locales/jquery.timeago.he.js +0 -18
  208. data/web/assets/javascripts/locales/jquery.timeago.hr.js +0 -49
  209. data/web/assets/javascripts/locales/jquery.timeago.hu.js +0 -18
  210. data/web/assets/javascripts/locales/jquery.timeago.hy.js +0 -18
  211. data/web/assets/javascripts/locales/jquery.timeago.id.js +0 -18
  212. data/web/assets/javascripts/locales/jquery.timeago.it.js +0 -16
  213. data/web/assets/javascripts/locales/jquery.timeago.ja.js +0 -19
  214. data/web/assets/javascripts/locales/jquery.timeago.ko.js +0 -17
  215. data/web/assets/javascripts/locales/jquery.timeago.lt.js +0 -20
  216. data/web/assets/javascripts/locales/jquery.timeago.mk.js +0 -20
  217. data/web/assets/javascripts/locales/jquery.timeago.nl.js +0 -20
  218. data/web/assets/javascripts/locales/jquery.timeago.no.js +0 -18
  219. data/web/assets/javascripts/locales/jquery.timeago.pl.js +0 -31
  220. data/web/assets/javascripts/locales/jquery.timeago.pt-br.js +0 -16
  221. data/web/assets/javascripts/locales/jquery.timeago.pt.js +0 -16
  222. data/web/assets/javascripts/locales/jquery.timeago.ro.js +0 -18
  223. data/web/assets/javascripts/locales/jquery.timeago.rs.js +0 -49
  224. data/web/assets/javascripts/locales/jquery.timeago.ru.js +0 -34
  225. data/web/assets/javascripts/locales/jquery.timeago.sk.js +0 -18
  226. data/web/assets/javascripts/locales/jquery.timeago.sl.js +0 -44
  227. data/web/assets/javascripts/locales/jquery.timeago.sv.js +0 -18
  228. data/web/assets/javascripts/locales/jquery.timeago.th.js +0 -20
  229. data/web/assets/javascripts/locales/jquery.timeago.tr.js +0 -16
  230. data/web/assets/javascripts/locales/jquery.timeago.uk.js +0 -34
  231. data/web/assets/javascripts/locales/jquery.timeago.uz.js +0 -19
  232. data/web/assets/javascripts/locales/jquery.timeago.zh-cn.js +0 -20
  233. data/web/assets/javascripts/locales/jquery.timeago.zh-tw.js +0 -20
  234. data/web/views/_poll.erb +0 -10
  235. /data/web/assets/images/{status-sd8051fd480.png → status.png} +0 -0
data/Contributing.md DELETED
@@ -1,32 +0,0 @@
1
- # Contributing
2
-
3
- ## Issues
4
-
5
- When opening an issue:
6
-
7
- * include the full **backtrace** with your error
8
- * include your Sidekiq initializer
9
- * list versions you are using: Ruby, Rails, Sidekiq, OS, etc.
10
-
11
- It's always better to include more info rather than less.
12
-
13
- ## Code
14
-
15
- It's always best to open an issue before investing a lot of time into a
16
- fix or new functionality. Functionality must meet my design goals and
17
- vision for the project to be accepted; I would be happy to discuss how
18
- your idea can best fit into Sidekiq.
19
-
20
- ## Legal
21
-
22
- By submitting a Pull Request, you disavow any rights or claims to any changes
23
- submitted to the Sidekiq project and assign the copyright of
24
- those changes to Contributed Systems LLC.
25
-
26
- If you cannot or do not want to reassign those rights (your employment
27
- contract for your employer may not allow this), you should not submit a PR.
28
- Open an issue and someone else can do the work.
29
-
30
- This is a legal way of saying "If you submit a PR to us, that code becomes ours".
31
- 99.9% of the time that's what you intend anyways; we hope it doesn't scare you
32
- away from contributing.
data/Gemfile DELETED
@@ -1,22 +0,0 @@
1
- source 'https://rubygems.org'
2
- gemspec
3
-
4
- platforms :rbx do
5
- gem 'rubysl', '~> 2.0' # if using anything in the ruby standard library
6
- gem 'psych' # if using yaml
7
- gem 'minitest' # if using minitest
8
- gem 'rubinius-developer_tools' # if using any of coverage, debugger, profiler
9
- end
10
-
11
- platforms :ruby do
12
- gem 'sqlite3'
13
- end
14
-
15
- platforms :mri do
16
- gem 'pry-byebug'
17
- end
18
-
19
- platforms :jruby do
20
- gem 'jruby-openssl'
21
- gem 'activerecord-jdbcsqlite3-adapter'
22
- end
data/LICENSE DELETED
@@ -1,9 +0,0 @@
1
- Copyright (c) Contributed Systems LLC
2
-
3
- Sidekiq is an Open Source project licensed under the terms of
4
- the LGPLv3 license. Please see <http://www.gnu.org/licenses/lgpl-3.0.html>
5
- for license text.
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.
data/Pro-2.0-Upgrade.md DELETED
@@ -1,138 +0,0 @@
1
- # Upgrading to Sidekiq Pro 2.0
2
-
3
- Sidekiq Pro 2.0 allows nested batches for more complex job workflows
4
- and provides a new reliable scheduler which uses Lua to guarantee
5
- atomicity and much higher performance.
6
-
7
- It also removes deprecated APIs, changes the batch data format and
8
- how features are activated. Read carefully to ensure your upgrade goes
9
- smoothly.
10
-
11
- Sidekiq Pro 2.0 requires Sidekiq 3.3.2 or greater. Redis 2.8 is
12
- recommended; Redis 2.4 or 2.6 will work but some functionality will not be
13
- available.
14
-
15
- **Note that you CANNOT go back to Pro 1.x once you've created batches
16
- with 2.x. The new batches will not process correctly with 1.x.**
17
-
18
- **If you are on a version of Sidekiq Pro <1.5, you should upgrade to the
19
- latest 1.x version and run it for a week before upgrading to 2.0.**
20
-
21
- ## Nested Batches
22
-
23
- Batches can now be nested within the `jobs` method.
24
- This feature enables Sidekiq Pro to handle workflow processing of any size
25
- and complexity!
26
-
27
- ```ruby
28
- a = Sidekiq::Batch.new
29
- a.on(:success, SomeCallback)
30
- a.jobs do
31
- SomeWork.perform_async
32
-
33
- b = Sidekiq::Batch.new
34
- b.on(:success, MyCallback)
35
- b.jobs do
36
- OtherWork.perform_async
37
- end
38
- end
39
- ```
40
-
41
- Parent batch callbacks are not processed until all child batch callbacks have
42
- run successfully. In the example above, `MyCallback` will always fire
43
- before `SomeCallback` because `b` is considered a child of `a`.
44
-
45
- Of course you can dynamically add child batches while a batch job is executing.
46
-
47
- ```ruby
48
- def perform(*args)
49
- do_something(args)
50
-
51
- if more_work?
52
- # Sidekiq::Worker#batch returns the Batch this job is part of.
53
- batch.jobs do
54
- b = Sidekiq::Batch.new
55
- b.on(:success, MyCallback)
56
- b.jobs do
57
- OtherWork.perform_async
58
- end
59
- end
60
- end
61
- end
62
- ```
63
-
64
- More context: [#1485]
65
-
66
- ## Batch Data
67
-
68
- The batch data model was overhauled. Batch data should take
69
- significantly less space in Redis now. A simple benchmark shows 25%
70
- savings but real world savings should be even greater.
71
-
72
- * Batch 2.x BIDs are 14 character URL-safe Base64-encoded strings, e.g.
73
- "vTF1-9QvLPnREQ". Batch 1.x BIDs were 16 character hex-encoded
74
- strings, e.g. "4a3fc67d30370edf".
75
- * In 1.x, batch data was not removed until it naturally expired in Redis.
76
- In 2.x, all data for a batch is removed from Redis once the batch has
77
- run any success callbacks.
78
- * Because of the former point, batch expiry is no longer a concern.
79
- Batch expiry is hardcoded to 30 days and is no longer user-tunable.
80
- * Failed batch jobs no longer automatically store any associated
81
- backtrace in Redis.
82
-
83
- **There's no data migration required. Sidekiq Pro 2.0 transparently handles
84
- both old and new format.**
85
-
86
- More context: [#2130]
87
-
88
- ## Reliability
89
-
90
- 2.0 brings a new reliable scheduler which uses Lua inside Redis so enqueuing
91
- scheduled jobs is atomic. Benchmarks show it 50x faster when enqueuing
92
- lots of jobs.
93
-
94
- **Two caveats**:
95
- - Client-side middleware is not executed
96
- for each job when enqueued with the reliable scheduler. No Sidekiq or
97
- Sidekiq Pro functionality is affected by this change but some 3rd party
98
- plugins might be.
99
- - The Lua script used inside the reliable scheduler is not safe for use
100
- with Redis Cluster, Redis Sentinel or other distributed Redis solutions.
101
- It is safe to use with a typical master/slave replication setup.
102
-
103
- **You no longer require anything to use the Reliability features.**
104
-
105
- * Activate reliable fetch and/or the new reliable scheduler:
106
- ```ruby
107
- Sidekiq.configure_server do |config|
108
- config.reliable_fetch!
109
- config.reliable_scheduler!
110
- end
111
- ```
112
- * Activate reliable push:
113
- ```ruby
114
- Sidekiq::Client.reliable_push!
115
- ```
116
-
117
- More context: [#2130]
118
-
119
- ## Other Changes
120
-
121
- * You must require `sidekiq/pro/notifications` if you want to use the
122
- existing notification schemes. I don't recommend using them as the
123
- newer-style `Sidekiq::Batch#on` method is simpler and more flexible.
124
- * Several classes have been renamed. Generally these classes are ones
125
- you should not need to require/use in your own code, e.g. the Batch
126
- middleware.
127
- * You can add `attr_accessor :jid` to a Batch callback class and Sidekiq
128
- Pro will set it to the jid of the callback job. [#2178]
129
- * There's now an official API to iterate all known Batches [#2191]
130
- ```ruby
131
- Sidekiq::BatchSet.new.each {|status| p status.bid }
132
- ```
133
- * The Web UI now shows the Sidekiq Pro version in the footer. [#1991]
134
-
135
- ## Thanks
136
-
137
- Adam Prescott, Luke van der Hoeven and Jon Hyman all provided valuable
138
- feedback during the release process. Thank you guys!
data/Pro-Changes.md DELETED
@@ -1,412 +0,0 @@
1
- Sidekiq Pro Changelog
2
- =======================
3
-
4
- Please see [http://sidekiq.org/pro](http://sidekiq.org/pro) for more details and how to buy.
5
-
6
- HEAD
7
- -----------
8
-
9
- - Reliable push now only catches Redis exceptions [#2307]
10
-
11
- 2.0.3
12
- -----------
13
-
14
- - Display Batch callback data on the Batch details page. [#2347]
15
- - Fix incompatibility with Pro Web and Rack middleware. [#2344] Thank
16
- you to Jason Clark for the tip on how to fix it.
17
-
18
- 2.0.2
19
- -----------
20
-
21
- - Multiple Web UIs can now run in the same process. [#2267] If you have
22
- multiple Redis shards, you can mount UIs for all in the same process:
23
- ```ruby
24
- POOL1 = ConnectionPool.new { Redis.new(:url => "redis://localhost:6379/0") }
25
- POOL2 = ConnectionPool.new { Redis.new(:url => "redis://localhost:6378/0") }
26
-
27
- mount Sidekiq::Pro::Web => '/sidekiq' # default
28
- mount Sidekiq::Pro::Web.with(redis_pool: POOL1), at: '/sidekiq1', as: 'sidekiq1' # shard1
29
- mount Sidekiq::Pro::Web.with(redis_pool: POOL2), at: '/sidekiq2', as: 'sidekiq2' # shard2
30
- ```
31
- - **SECURITY** Fix batch XSS in error data. Thanks to moneybird.com for
32
- reporting the issue.
33
-
34
- 2.0.1
35
- -----------
36
-
37
- - Add `batch.callback_queue` so batch callbacks can use a higher
38
- priority queue than jobs. [#2200]
39
- - Gracefully recover if someone runs `SCRIPT FLUSH` on Redis. [#2240]
40
- - Ignore errors when attempting `bulk_requeue`, allowing clean shutdown
41
-
42
- 2.0.0
43
- -----------
44
-
45
- - See [the Upgrade Notes](Pro-2.0-Upgrade.md) for detailed notes.
46
-
47
- 1.9.2
48
- -----------
49
-
50
- - As of 1/1/2015, Sidekiq Pro is hosted on a new dedicated server.
51
- Happy new year and let's hope for 100% uptime!
52
- - Fix bug in reliable\_fetch where jobs could be duplicated if a Sidekiq
53
- process crashed and you were using weighted queues. [#2120]
54
-
55
- 1.9.1
56
- -----------
57
-
58
- - **SECURITY** Fix XSS in batch description, thanks to intercom.io for reporting the
59
- issue. If you don't use batch descriptions, you don't need the fix.
60
-
61
- 1.9.0
62
- -----------
63
-
64
- - Add new expiring jobs feature [#1982]
65
- - Show batch expiration on Batch details page [#1981]
66
- - Add '$' batch success token to the pubsub support. [#1953]
67
-
68
-
69
- 1.8.0
70
- -----------
71
-
72
- - Fix race condition where Batches can complete
73
- before they have been fully defined or only half-defined. Requires
74
- Sidekiq 3.2.3. [#1919]
75
-
76
-
77
- 1.7.6
78
- -----------
79
-
80
- - Quick release to verify #1919
81
-
82
-
83
- 1.7.5
84
- -----------
85
-
86
- - Fix job filtering within the Dead tab.
87
- - Add APIs and wiki documentation for invalidating jobs within a batch.
88
-
89
-
90
- 1.7.4
91
- -----------
92
-
93
- - Awesome ANSI art startup banner!
94
-
95
-
96
- 1.7.3
97
- -----------
98
-
99
- - Batch callbacks should use the same queue as the associated jobs.
100
-
101
- 1.7.2
102
- -----------
103
-
104
- - **DEPRECATION** Use `Batch#on(:complete)` instead of `Batch#notify`.
105
- The specific Campfire, HipChat, email and other notification schemes
106
- will be removed in 2.0.0.
107
- - Remove batch from UI when successful. [#1745]
108
- - Convert batch callbacks to be asynchronous jobs for error handling [#1744]
109
-
110
- 1.7.1
111
- -----------
112
-
113
- - Fix for paused queues being processed for a few seconds when starting
114
- a new Sidekiq process.
115
- - Add a 5 sec delay when starting reliable fetch on Heroku to minimize
116
- any duplicate job processing with another process shutting down.
117
-
118
- 1.7.0
119
- -----------
120
-
121
- - Add ability to pause reliable queues via API.
122
- ```ruby
123
- q = Sidekiq::Queue.new("critical")
124
- q.pause!
125
- q.paused? # => true
126
- q.unpause!
127
- ```
128
-
129
- Sidekiq polls Redis every 10 seconds for paused queues so pausing will take
130
- a few seconds to take effect.
131
-
132
- 1.6.0
133
- -----------
134
-
135
- - Compatible with Sidekiq 3.
136
-
137
- 1.5.1
138
- -----------
139
-
140
- - Due to a breaking API change in Sidekiq 3.0, this version is limited
141
- to Sidekiq 2.x.
142
-
143
- 1.5.0
144
- -----------
145
-
146
- - Fix issue on Heroku where reliable fetch could orphan jobs [#1573]
147
-
148
-
149
- 1.4.3
150
- -----------
151
-
152
- - Reverse sorting of Batches in Web UI [#1098]
153
- - Refactoring for Sidekiq 3.0, Pro now requires Sidekiq 2.17.5
154
-
155
- 1.4.2
156
- -----------
157
-
158
- - Tolerate expired Batches in the web UI.
159
- - Fix 100% CPU usage when using weighted queues and reliable fetch.
160
-
161
- 1.4.1
162
- -----------
163
-
164
- - Add batch progress bar to batch detail page. [#1398]
165
- - Fix race condition in initializing Lua scripts
166
-
167
-
168
- 1.4.0
169
- -----------
170
-
171
- - Default batch expiration has been extended to 3 days, from 1 day previously.
172
- - Batches now sort in the Web UI according to expiry time, not creation time.
173
- - Add user-configurable batch expiry. If your batches might take longer
174
- than 72 hours to process, you can extend the expiration date.
175
-
176
- ```ruby
177
- b = Sidekiq::Batch.new
178
- b.expires_in 5.days
179
- ...
180
- ```
181
-
182
- 1.3.2
183
- -----------
184
-
185
- - Lazy load Lua scripts so a Redis connection is not required on bootup.
186
-
187
- 1.3.1
188
- -----------
189
-
190
- - Fix a gemspec packaging issue which broke the Batch UI.
191
-
192
- 1.3.0
193
- -----------
194
-
195
- Thanks to @jonhyman for his contributions to this Sidekiq Pro release.
196
-
197
- This release includes new functionality based on the SCAN command newly
198
- added to Redis 2.8. Pro still works with Redis 2.4 but some
199
- functionality will be unavailable.
200
-
201
- - Job Filtering in the Web UI!
202
- You can now filter retries and scheduled jobs in the Web UI so you
203
- only see the jobs relevant to your needs. Queues cannot be filtered;
204
- Redis does not provide the same SCAN operation on the LIST type.
205
- **Redis 2.8**
206
- ![Filtering](https://f.cloud.github.com/assets/2911/1619465/f47529f2-5657-11e3-8cd1-33899eb72aad.png)
207
- - SCAN support in the Sidekiq::SortedSet API. Here's an example that
208
- finds all jobs which contain the substring "Warehouse::OrderShip"
209
- and deletes all matching retries. If the set is large, this API
210
- will be **MUCH** faster than standard iteration using each.
211
- **Redis 2.8**
212
- ```ruby
213
- Sidekiq::RetrySet.new.scan("Warehouse::OrderShip") do |job|
214
- job.delete
215
- end
216
- ```
217
-
218
- - Sidekiq::Batch#jobs now returns the set of JIDs added to the batch.
219
- - Sidekiq::Batch#jids returns the complete set of JIDs associated with the batch.
220
- - Sidekiq::Batch#remove\_jobs(jid, jid, ...) removes JIDs from the set, allowing early termination of jobs if they become irrelevant according to application logic.
221
- - Sidekiq::Batch#include?(jid) allows jobs to check if they are still
222
- relevant to a Batch and exit early if not.
223
- - Sidekiq::SortedSet#find\_job(jid) now uses server-side Lua if possible **Redis 2.6** [jonhyman]
224
- - The statsd integration now sets global job counts:
225
- ```ruby
226
- jobs.count
227
- jobs.success
228
- jobs.failure
229
- ```
230
-
231
- - Change shutdown logic to push leftover jobs in the private queue back
232
- into the public queue when shutting down with Reliable Fetch. This
233
- allows the safe decommission of a Sidekiq Pro process when autoscaling. [jonhyman]
234
- - Add support for weighted random fetching with Reliable Fetch [jonhyman]
235
- - Pro now requires Sidekiq 2.17.0
236
-
237
- 1.2.5
238
- -----------
239
-
240
- - Convert Batch UI to use Sidekiq 2.16's support for extension localization.
241
- - Update reliable\_push to work with Sidekiq::Client refactoring in 2.16
242
- - Pro now requires Sidekiq 2.16.0
243
-
244
- 1.2.4
245
- -----------
246
-
247
- - Convert Batch UI to Bootstrap 3
248
- - Pro now requires Sidekiq 2.15.0
249
- - Add Sidekiq::Batch::Status#delete [#1205]
250
-
251
- 1.2.3
252
- -----------
253
-
254
- - Pro now requires Sidekiq 2.14.0
255
- - Fix bad exception handling in batch callbacks [#1134]
256
- - Convert Batch UI to ERB
257
-
258
- 1.2.2
259
- -----------
260
-
261
- - Problem with reliable fetch which could lead to lost jobs when Sidekiq
262
- is shut down normally. Thanks to MikaelAmborn for the report. [#1109]
263
-
264
- 1.2.1
265
- -----------
266
-
267
- - Forgot to push paging code necessary for `delete_job` performance.
268
-
269
- 1.2.0
270
- -----------
271
-
272
- - **LEAK** Fix batch key which didn't expire in Redis. Keys match
273
- /b-[a-f0-9]{16}-pending/, e.g. "b-4f55163ddba10aa0-pending" [#1057]
274
- - **Reliable fetch now supports multiple queues**, using the algorithm spec'd
275
- by @jackrg [#1102]
276
- - Fix issue with reliable\_push where it didn't return the JID for a pushed
277
- job when sending previously cached jobs to Redis.
278
- - Add fast Sidekiq::Queue#delete\_job(jid) API which leverages Lua so job lookup is
279
- 100% server-side. Benchmark vs Sidekiq's Job#delete API. **Redis 2.6**
280
-
281
- ```
282
- Sidekiq Pro API
283
- 0.030000 0.020000 0.050000 ( 1.640659)
284
- Sidekiq API
285
- 17.250000 2.220000 19.470000 ( 22.193300)
286
- ```
287
-
288
- - Add fast Sidekiq::Queue#delete\_by\_class(klass) API to remove all
289
- jobs of a given type. Uses server-side Lua for performance. **Redis 2.6**
290
-
291
- 1.1.0
292
- -----------
293
-
294
- - New `sidekiq/pro/reliable_push` which makes Sidekiq::Client resiliant
295
- to Redis network failures. [#793]
296
- - Move `sidekiq/reliable_fetch` to `sidekiq/pro/reliable_fetch`
297
-
298
-
299
- 1.0.0
300
- -----------
301
-
302
- - Sidekiq Pro changelog moved to mperham/sidekiq for public visibility.
303
- - Add new Rack endpoint for easy polling of batch status via JavaScript. See `sidekiq/rack/batch_status`
304
-
305
- 0.9.3
306
- -----------
307
-
308
- - Fix bad /batches path in Web UI
309
- - Fix Sinatra conflict with sidekiq-failures
310
-
311
- 0.9.2
312
- -----------
313
-
314
- - Fix issue with lifecycle notifications not firing.
315
-
316
- 0.9.1
317
- -----------
318
-
319
- - Update due to Sidekiq API changes.
320
-
321
- 0.9.0
322
- -----------
323
-
324
- - Rearchitect Sidekiq's Fetch code to support different fetch
325
- strategies. Add a ReliableFetch strategy which works with Redis'
326
- RPOPLPUSH to ensure we don't lose messages, even when the Sidekiq
327
- process crashes unexpectedly. [mperham/sidekiq#607]
328
-
329
- 0.8.2
330
- -----------
331
-
332
- - Reimplement existing notifications using batch on_complete events.
333
-
334
- 0.8.1
335
- -----------
336
-
337
- - Rejigger batch callback notifications.
338
-
339
-
340
- 0.8.0
341
- -----------
342
-
343
- - Add new Batch 'callback' notification support, for in-process
344
- notification.
345
- - Symbolize option keys passed to Pony [mperham/sidekiq#603]
346
- - Batch no longer requires the Web UI since Web UI usage is optional.
347
- You must require is manually in your Web process:
348
-
349
- ```ruby
350
- require 'sidekiq/web'
351
- require 'sidekiq/batch/web'
352
- mount Sidekiq::Web => '/sidekiq'
353
- ```
354
-
355
-
356
- 0.7.1
357
- -----------
358
-
359
- - Worker instances can access the associated jid and bid via simple
360
- accessors.
361
- - Batches can now be modified while being processed so, e.g. a batch
362
- job can add additional jobs to its own batch.
363
-
364
- ```ruby
365
- def perform(...)
366
- batch = Sidekiq::Batch.new(bid) # instantiate batch associated with this job
367
- batch.jobs do
368
- SomeWorker.perform_async # add another job
369
- end
370
- end
371
- ```
372
-
373
- - Save error backtraces in batch's failure info for display in Web UI.
374
- - Clean up email notification a bit.
375
-
376
-
377
- 0.7.0
378
- -----------
379
-
380
- - Add optional batch description
381
- - Mutable batches. Batches can now be modified to add additional jobs
382
- at runtime. Example would be a batch job which needs to create more
383
- jobs based on the data it is processing.
384
-
385
- ```ruby
386
- batch = Sidekiq::Batch.new(bid)
387
- batch.jobs do
388
- # define more jobs here
389
- end
390
- ```
391
- - Fix issues with symbols vs strings in option hashes
392
-
393
-
394
- 0.6.1
395
- -----------
396
-
397
- - Webhook notification support
398
-
399
-
400
- 0.6
401
- -----------
402
-
403
- - Redis pubsub
404
- - Email polish
405
-
406
-
407
- 0.5
408
- -----------
409
-
410
- - Batches
411
- - Notifications
412
- - Statsd middleware
data/Rakefile DELETED
@@ -1,9 +0,0 @@
1
- require 'bundler/gem_tasks'
2
- require 'rake/testtask'
3
- Rake::TestTask.new(:test) do |test|
4
- #SO MUCH NOISE
5
- #test.warning = true
6
- test.pattern = 'test/**/test_*.rb'
7
- end
8
-
9
- task :default => :test