roundhouse-x 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +12 -0
  3. data/.travis.yml +16 -0
  4. data/3.0-Upgrade.md +70 -0
  5. data/Changes.md +1127 -0
  6. data/Gemfile +27 -0
  7. data/LICENSE +7 -0
  8. data/README.md +52 -0
  9. data/Rakefile +9 -0
  10. data/bin/roundhouse +19 -0
  11. data/bin/roundhousectl +93 -0
  12. data/lib/generators/roundhouse/templates/worker.rb.erb +9 -0
  13. data/lib/generators/roundhouse/templates/worker_spec.rb.erb +6 -0
  14. data/lib/generators/roundhouse/templates/worker_test.rb.erb +8 -0
  15. data/lib/generators/roundhouse/worker_generator.rb +49 -0
  16. data/lib/roundhouse/actor.rb +39 -0
  17. data/lib/roundhouse/api.rb +859 -0
  18. data/lib/roundhouse/cli.rb +396 -0
  19. data/lib/roundhouse/client.rb +210 -0
  20. data/lib/roundhouse/core_ext.rb +105 -0
  21. data/lib/roundhouse/exception_handler.rb +30 -0
  22. data/lib/roundhouse/fetch.rb +154 -0
  23. data/lib/roundhouse/launcher.rb +98 -0
  24. data/lib/roundhouse/logging.rb +104 -0
  25. data/lib/roundhouse/manager.rb +236 -0
  26. data/lib/roundhouse/middleware/chain.rb +149 -0
  27. data/lib/roundhouse/middleware/i18n.rb +41 -0
  28. data/lib/roundhouse/middleware/server/active_record.rb +13 -0
  29. data/lib/roundhouse/middleware/server/logging.rb +40 -0
  30. data/lib/roundhouse/middleware/server/retry_jobs.rb +206 -0
  31. data/lib/roundhouse/monitor.rb +124 -0
  32. data/lib/roundhouse/paginator.rb +42 -0
  33. data/lib/roundhouse/processor.rb +159 -0
  34. data/lib/roundhouse/rails.rb +24 -0
  35. data/lib/roundhouse/redis_connection.rb +77 -0
  36. data/lib/roundhouse/scheduled.rb +115 -0
  37. data/lib/roundhouse/testing/inline.rb +28 -0
  38. data/lib/roundhouse/testing.rb +193 -0
  39. data/lib/roundhouse/util.rb +68 -0
  40. data/lib/roundhouse/version.rb +3 -0
  41. data/lib/roundhouse/web.rb +264 -0
  42. data/lib/roundhouse/web_helpers.rb +249 -0
  43. data/lib/roundhouse/worker.rb +90 -0
  44. data/lib/roundhouse.rb +177 -0
  45. data/roundhouse.gemspec +27 -0
  46. data/test/config.yml +9 -0
  47. data/test/env_based_config.yml +11 -0
  48. data/test/fake_env.rb +0 -0
  49. data/test/fixtures/en.yml +2 -0
  50. data/test/helper.rb +49 -0
  51. data/test/test_api.rb +521 -0
  52. data/test/test_cli.rb +389 -0
  53. data/test/test_client.rb +294 -0
  54. data/test/test_exception_handler.rb +55 -0
  55. data/test/test_fetch.rb +206 -0
  56. data/test/test_logging.rb +34 -0
  57. data/test/test_manager.rb +169 -0
  58. data/test/test_middleware.rb +160 -0
  59. data/test/test_monitor.rb +258 -0
  60. data/test/test_processor.rb +176 -0
  61. data/test/test_rails.rb +23 -0
  62. data/test/test_redis_connection.rb +127 -0
  63. data/test/test_retry.rb +390 -0
  64. data/test/test_roundhouse.rb +87 -0
  65. data/test/test_scheduled.rb +120 -0
  66. data/test/test_scheduling.rb +75 -0
  67. data/test/test_testing.rb +78 -0
  68. data/test/test_testing_fake.rb +240 -0
  69. data/test/test_testing_inline.rb +65 -0
  70. data/test/test_util.rb +18 -0
  71. data/test/test_web.rb +605 -0
  72. data/test/test_web_helpers.rb +52 -0
  73. data/web/assets/images/bootstrap/glyphicons-halflings-white.png +0 -0
  74. data/web/assets/images/bootstrap/glyphicons-halflings.png +0 -0
  75. data/web/assets/images/logo.png +0 -0
  76. data/web/assets/images/status/active.png +0 -0
  77. data/web/assets/images/status/idle.png +0 -0
  78. data/web/assets/images/status-sd8051fd480.png +0 -0
  79. data/web/assets/javascripts/application.js +83 -0
  80. data/web/assets/javascripts/dashboard.js +300 -0
  81. data/web/assets/javascripts/locales/README.md +27 -0
  82. data/web/assets/javascripts/locales/jquery.timeago.ar.js +96 -0
  83. data/web/assets/javascripts/locales/jquery.timeago.bg.js +18 -0
  84. data/web/assets/javascripts/locales/jquery.timeago.bs.js +49 -0
  85. data/web/assets/javascripts/locales/jquery.timeago.ca.js +18 -0
  86. data/web/assets/javascripts/locales/jquery.timeago.cs.js +18 -0
  87. data/web/assets/javascripts/locales/jquery.timeago.cy.js +20 -0
  88. data/web/assets/javascripts/locales/jquery.timeago.da.js +18 -0
  89. data/web/assets/javascripts/locales/jquery.timeago.de.js +18 -0
  90. data/web/assets/javascripts/locales/jquery.timeago.el.js +18 -0
  91. data/web/assets/javascripts/locales/jquery.timeago.en-short.js +20 -0
  92. data/web/assets/javascripts/locales/jquery.timeago.en.js +20 -0
  93. data/web/assets/javascripts/locales/jquery.timeago.es.js +18 -0
  94. data/web/assets/javascripts/locales/jquery.timeago.et.js +18 -0
  95. data/web/assets/javascripts/locales/jquery.timeago.fa.js +22 -0
  96. data/web/assets/javascripts/locales/jquery.timeago.fi.js +28 -0
  97. data/web/assets/javascripts/locales/jquery.timeago.fr-short.js +16 -0
  98. data/web/assets/javascripts/locales/jquery.timeago.fr.js +17 -0
  99. data/web/assets/javascripts/locales/jquery.timeago.he.js +18 -0
  100. data/web/assets/javascripts/locales/jquery.timeago.hr.js +49 -0
  101. data/web/assets/javascripts/locales/jquery.timeago.hu.js +18 -0
  102. data/web/assets/javascripts/locales/jquery.timeago.hy.js +18 -0
  103. data/web/assets/javascripts/locales/jquery.timeago.id.js +18 -0
  104. data/web/assets/javascripts/locales/jquery.timeago.it.js +16 -0
  105. data/web/assets/javascripts/locales/jquery.timeago.ja.js +19 -0
  106. data/web/assets/javascripts/locales/jquery.timeago.ko.js +17 -0
  107. data/web/assets/javascripts/locales/jquery.timeago.lt.js +20 -0
  108. data/web/assets/javascripts/locales/jquery.timeago.mk.js +20 -0
  109. data/web/assets/javascripts/locales/jquery.timeago.nl.js +20 -0
  110. data/web/assets/javascripts/locales/jquery.timeago.no.js +18 -0
  111. data/web/assets/javascripts/locales/jquery.timeago.pl.js +31 -0
  112. data/web/assets/javascripts/locales/jquery.timeago.pt-br.js +16 -0
  113. data/web/assets/javascripts/locales/jquery.timeago.pt.js +16 -0
  114. data/web/assets/javascripts/locales/jquery.timeago.ro.js +18 -0
  115. data/web/assets/javascripts/locales/jquery.timeago.rs.js +49 -0
  116. data/web/assets/javascripts/locales/jquery.timeago.ru.js +34 -0
  117. data/web/assets/javascripts/locales/jquery.timeago.sk.js +18 -0
  118. data/web/assets/javascripts/locales/jquery.timeago.sl.js +44 -0
  119. data/web/assets/javascripts/locales/jquery.timeago.sv.js +18 -0
  120. data/web/assets/javascripts/locales/jquery.timeago.th.js +20 -0
  121. data/web/assets/javascripts/locales/jquery.timeago.tr.js +16 -0
  122. data/web/assets/javascripts/locales/jquery.timeago.uk.js +34 -0
  123. data/web/assets/javascripts/locales/jquery.timeago.uz.js +19 -0
  124. data/web/assets/javascripts/locales/jquery.timeago.zh-cn.js +20 -0
  125. data/web/assets/javascripts/locales/jquery.timeago.zh-tw.js +20 -0
  126. data/web/assets/stylesheets/application.css +746 -0
  127. data/web/assets/stylesheets/bootstrap.css +9 -0
  128. data/web/locales/cs.yml +68 -0
  129. data/web/locales/da.yml +68 -0
  130. data/web/locales/de.yml +69 -0
  131. data/web/locales/el.yml +68 -0
  132. data/web/locales/en.yml +77 -0
  133. data/web/locales/es.yml +69 -0
  134. data/web/locales/fr.yml +69 -0
  135. data/web/locales/hi.yml +75 -0
  136. data/web/locales/it.yml +69 -0
  137. data/web/locales/ja.yml +69 -0
  138. data/web/locales/ko.yml +68 -0
  139. data/web/locales/nl.yml +68 -0
  140. data/web/locales/no.yml +69 -0
  141. data/web/locales/pl.yml +59 -0
  142. data/web/locales/pt-br.yml +68 -0
  143. data/web/locales/pt.yml +67 -0
  144. data/web/locales/ru.yml +75 -0
  145. data/web/locales/sv.yml +68 -0
  146. data/web/locales/ta.yml +75 -0
  147. data/web/locales/zh-cn.yml +68 -0
  148. data/web/locales/zh-tw.yml +68 -0
  149. data/web/views/_footer.erb +22 -0
  150. data/web/views/_job_info.erb +84 -0
  151. data/web/views/_nav.erb +66 -0
  152. data/web/views/_paging.erb +23 -0
  153. data/web/views/_poll_js.erb +5 -0
  154. data/web/views/_poll_link.erb +7 -0
  155. data/web/views/_status.erb +4 -0
  156. data/web/views/_summary.erb +40 -0
  157. data/web/views/busy.erb +90 -0
  158. data/web/views/dashboard.erb +75 -0
  159. data/web/views/dead.erb +34 -0
  160. data/web/views/layout.erb +31 -0
  161. data/web/views/morgue.erb +71 -0
  162. data/web/views/queue.erb +45 -0
  163. data/web/views/queues.erb +27 -0
  164. data/web/views/retries.erb +74 -0
  165. data/web/views/retry.erb +34 -0
  166. data/web/views/scheduled.erb +54 -0
  167. data/web/views/scheduled_job_info.erb +8 -0
  168. metadata +404 -0
data/Changes.md ADDED
@@ -0,0 +1,1127 @@
1
+ Roundhouse 0.1.0
2
+ -----------
3
+ - Stuff.
4
+
5
+ Sidekiq HEAD
6
+ -----------
7
+
8
+ - Upgrade to Celluloid 0.17. [#2420]
9
+ - Activate sessions in Sinatra for CSRF protection. See issue #2460
10
+ if you see a Rails error with `ActionDispatch::Request::Session`
11
+ on upgrade. This is a Rails incompatibility with Rack and not a
12
+ Sidekiq bug. The issue contains a monkeypatch workaround. [#2460]
13
+
14
+ 3.4.2
15
+ -----------
16
+
17
+ - Don't allow `Sidekiq::Worker` in ActiveJob::Base classes. [#2424]
18
+ - Safer display of job data in Web UI [#2405]
19
+ - Fix CSRF vulnerability in Web UI, thanks to Egor Homakov for
20
+ reporting. [#2422] If you are running the Web UI as a standalone Rack app,
21
+ ensure you have a [session middleware
22
+ configured](https://github.com/mperham/sidekiq/wiki/Monitoring#standalone):
23
+ ```ruby
24
+ use Rack::Session::Cookie, :secret => "some unique secret string here"
25
+ ```
26
+
27
+ 3.4.1
28
+ -----------
29
+
30
+ - Lock to Celluloid 0.16
31
+
32
+
33
+ 3.4.0
34
+ -----------
35
+
36
+ - Set a `created_at` attribute when jobs are created, set `enqueued_at` only
37
+ when they go into a queue. Fixes invalid latency calculations with scheduled jobs.
38
+ [#2373, mrsimo]
39
+ - Don't log timestamp on Heroku [#2343]
40
+ - Run `shutdown` event handlers in reverse order of definition [#2374]
41
+ - Rename and rework `poll_interval` to be simpler, more predictable [#2317, cainlevy]
42
+ The new setting is `average_scheduled_poll_interval`. To configure
43
+ Sidekiq to look for scheduled jobs every 5 seconds, just set it to 5.
44
+ ```ruby
45
+ Sidekiq.configure_server do |config|
46
+ config.average_scheduled_poll_interval = 5
47
+ end
48
+ ```
49
+
50
+ 3.3.4
51
+ -----------
52
+
53
+ - **Improved ActiveJob integration** - Web UI now shows ActiveJobs in a
54
+ nicer format and job logging shows the actual class name, requires
55
+ Rails 4.2.2+ [#2248, #2259]
56
+ - Add Sidekiq::Process#dump\_threads API to trigger TTIN output [#2247]
57
+ - Web UI polling now uses Ajax to avoid page reload [#2266, davydovanton]
58
+ - Several Web UI styling improvements [davydovanton]
59
+ - Add Tamil, Hindi translations for Web UI [ferdinandrosario, tejasbubane]
60
+ - Fix Web UI to work with country-specific locales [#2243]
61
+ - Handle circular error causes [#2285, eugenk]
62
+
63
+ 3.3.3
64
+ -----------
65
+
66
+ - Fix crash on exit when Redis is down [#2235]
67
+ - Fix duplicate logging on startup
68
+ - Undeprecate delay extension for ActionMailer 4.2+ . [#2186]
69
+
70
+ 3.3.2
71
+ -----------
72
+
73
+ - Add Sidekiq::Stats#queues back
74
+ - Allows configuration of dead job set size and timeout [#2173, jonhyman]
75
+ - Refactor scheduler enqueuing so Sidekiq Pro can override it. [#2159]
76
+
77
+ 3.3.1
78
+ -----------
79
+
80
+ - Dumb down ActionMailer integration so it tries to deliver if possible [#2149]
81
+ - Stringify Sidekiq.default\_worker\_options's keys [#2126]
82
+ - Add random integer to process identity [#2113, michaeldiscala]
83
+ - Log Sidekiq Pro's Batch ID if available [#2076]
84
+ - Refactor Processor Redis usage to avoid redis/redis-rb#490 [#2094]
85
+ - Move /dashboard/stats to /stats. Add /stats/queues. [moserke, #2099]
86
+ - Add processes count to /stats [ismaelga, #2141]
87
+ - Greatly improve speed of Sidekiq::Stats [ismaelga, #2142]
88
+ - Add better usage text for `sidekiqctl`.
89
+ - `Sidekiq::Logging.with_context` is now a stack so you can set your
90
+ own job context for logging purposes [grosser, #2110]
91
+ - Remove usage of Google Fonts in Web UI so it loads in China [#2144]
92
+
93
+ 3.3.0
94
+ -----------
95
+
96
+ - Upgrade to Celluloid 0.16 [#2056]
97
+ - Fix typo for generator test file name [dlackty, #2016]
98
+ - Add Sidekiq::Middleware::Chain#prepend [seuros, #2029]
99
+
100
+ 3.2.6
101
+ -----------
102
+
103
+ - Deprecate delay extension for ActionMailer 4.2+ . [seuros, #1933]
104
+ - Poll interval tuning now accounts for dead processes [epchris, #1984]
105
+ - Add non-production environment to Web UI page titles [JacobEvelyn, #2004]
106
+
107
+ 3.2.5
108
+ -----------
109
+
110
+ - Lock Celluloid to 0.15.2 due to bugs in 0.16.0. This prevents the
111
+ "hang on shutdown" problem with Celluloid 0.16.0.
112
+
113
+ 3.2.4
114
+ -----------
115
+
116
+ - Fix issue preventing ActionMailer sends working in some cases with
117
+ Rails 4. [pbhogan, #1923]
118
+
119
+ 3.2.3
120
+ -----------
121
+
122
+ - Clean invalid bytes from error message before converting to JSON (requires Ruby 2.1+) [#1705]
123
+ - Add queues list for each process to the Busy page. [davetoxa, #1897]
124
+ - Fix for crash caused by empty config file. [jordan0day, #1901]
125
+ - Add Rails Worker generator, `rails g sidekiq:worker User` will create `app/workers/user_worker.rb`. [seuros, #1909]
126
+ - Fix Web UI rendering with huge job arguments [jhass, #1918]
127
+ - Minor refactoring of Sidekiq::Client internals, for Sidekiq Pro. [#1919]
128
+
129
+ 3.2.2
130
+ -----------
131
+
132
+ - **This version of Sidekiq will no longer start on Ruby 1.9.** Sidekiq
133
+ 3 does not support MRI 1.9 but we've allowed it to run before now.
134
+ - Fix issue which could cause Sidekiq workers to disappear from the Busy
135
+ tab while still being active [#1884]
136
+ - Add "Back to App" button in Web UI. You can set the button link via
137
+ `Sidekiq::Web.app_url = 'http://www.mysite.com'` [#1875, seuros]
138
+ - Add process tag (`-g tag`) to the Busy page so you can differentiate processes at a glance. [seuros, #1878]
139
+ - Add "Kill" button to move retries directly to the DJQ so they don't retry. [seuros, #1867]
140
+
141
+ 3.2.1
142
+ -----------
143
+
144
+ - Revert eager loading change for Rails 3.x apps, as it broke a few edge
145
+ cases.
146
+
147
+ 3.2.0
148
+ -----------
149
+
150
+ - **Fix issue which caused duplicate job execution in Rails 3.x**
151
+ This issue is caused by [improper exception handling in ActiveRecord](https://github.com/rails/rails/blob/3-2-stable/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#L281) which changes Sidekiq's Shutdown exception into a database
152
+ error, making Sidekiq think the job needs to be retried. **The fix requires Ruby 2.1**. [#1805]
153
+ - Update how Sidekiq eager loads Rails application code [#1791, jonleighton]
154
+ - Change logging timestamp to show milliseconds.
155
+ - Reverse sorting of Dead tab so newer jobs are listed first [#1802]
156
+
157
+ 3.1.4
158
+ -----------
159
+
160
+ - Happy π release!
161
+ - Self-tuning Scheduler polling, we use heartbeat info to better tune poll\_interval [#1630]
162
+ - Remove all table column width rules, hopefully get better column formatting [#1747]
163
+ - Handle edge case where YAML can't be decoded in dev mode [#1761]
164
+ - Fix lingering jobs in Busy page on Heroku [#1764]
165
+
166
+ 3.1.3
167
+ -----------
168
+
169
+ - Use ENV['DYNO'] on Heroku for hostname display, rather than an ugly UUID. [#1742]
170
+ - Show per-process labels on the Busy page, for feature tagging [#1673]
171
+
172
+
173
+ 3.1.2
174
+ -----------
175
+
176
+ - Suitably chastised, @mperham reverts the Bundler change.
177
+
178
+
179
+ 3.1.1
180
+ -----------
181
+
182
+ - Sidekiq::CLI now runs `Bundler.require(:default, environment)` to boot all gems
183
+ before loading any app code.
184
+ - Sort queues by name in Web UI [#1734]
185
+
186
+
187
+ 3.1.0
188
+ -----------
189
+
190
+ - New **remote control** feature: you can remotely trigger Sidekiq to quiet
191
+ or terminate via API, without signals. This is most useful on JRuby
192
+ or Heroku which does not support the USR1 'quiet' signal. Now you can
193
+ run a rake task like this at the start of your deploy to quiet your
194
+ set of Sidekiq processes. [#1703]
195
+ ```ruby
196
+ namespace :sidekiq do
197
+ task :quiet => :environment do
198
+ Sidekiq::ProcessSet.new.each(&:quiet!)
199
+ end
200
+ end
201
+ ```
202
+ - The Web UI can use the API to quiet or stop all processes via the Busy page.
203
+ - The Web UI understands and hides the `Sidekiq::Extensions::Delay*`
204
+ classes, instead showing `Class.method` as the Job. [#1718]
205
+ - Polish the Dashboard graphs a bit, update Rickshaw [brandonhilkert, #1725]
206
+ - The poll interval is now configurable in the Web UI [madebydna, #1713]
207
+ - Delay extensions can be removed so they don't conflict with
208
+ DelayedJob: put `Sidekiq.remove_delay!` in your initializer. [devaroop, #1674]
209
+
210
+
211
+ 3.0.2
212
+ -----------
213
+
214
+ - Revert gemfile requirement of Ruby 2.0. JRuby 1.7 calls itself Ruby
215
+ 1.9.3 and broke with this requirement.
216
+
217
+ 3.0.1
218
+ -----------
219
+
220
+ - Revert pidfile behavior from 2.17.5: Sidekiq will no longer remove its own pidfile
221
+ as this is a race condition when restarting. [#1470, #1677]
222
+ - Show warning on the Queues page if a queue is paused [#1672]
223
+ - Only activate the ActiveRecord middleware if ActiveRecord::Base is defined on boot. [#1666]
224
+ - Add ability to disable jobs going to the DJQ with the `dead` option.
225
+ ```ruby
226
+ sidekiq_options :dead => false, :retry => 5
227
+ ```
228
+ - Minor fixes
229
+
230
+
231
+ 3.0.0
232
+ -----------
233
+
234
+ Please see [3.0-Upgrade.md](3.0-Upgrade.md) for more comprehensive upgrade notes.
235
+
236
+ - **Dead Job Queue** - jobs which run out of retries are now moved to a dead
237
+ job queue. These jobs must be retried manually or they will expire
238
+ after 6 months or 10,000 jobs. The Web UI contains a "Dead" tab
239
+ exposing these jobs. Use `sidekiq_options :retry => false` if you
240
+ don't wish jobs to be retried or put in the DJQ. Use
241
+ `sidekiq_options :retry => 0` if you don't want jobs to retry but go
242
+ straight to the DJQ.
243
+ - **Process Lifecycle Events** - you can now register blocks to run at
244
+ certain points during the Sidekiq process lifecycle: startup, quiet and
245
+ shutdown.
246
+ ```ruby
247
+ Sidekiq.configure_server do |config|
248
+ config.on(:startup) do
249
+ # do something
250
+ end
251
+ end
252
+ ```
253
+ - **Global Error Handlers** - blocks of code which handle errors that
254
+ occur anywhere within Sidekiq, not just within middleware.
255
+ ```ruby
256
+ Sidekiq.configure_server do |config|
257
+ config.error_handlers << proc {|ex,ctx| ... }
258
+ end
259
+ ```
260
+ - **Process Heartbeat** - each Sidekiq process will ping Redis every 5
261
+ seconds to give a summary of the Sidekiq population at work.
262
+ - The Workers tab is now renamed to Busy and contains a list of live
263
+ Sidekiq processes and jobs in progress based on the heartbeat.
264
+ - **Shardable Client** - Sidekiq::Client instances can use a custom
265
+ Redis connection pool, allowing very large Sidekiq installations to scale by
266
+ sharding: sending different jobs to different Redis instances.
267
+ ```ruby
268
+ client = Sidekiq::Client.new(ConnectionPool.new { Redis.new })
269
+ client.push(...)
270
+ ```
271
+ ```ruby
272
+ Sidekiq::Client.via(ConnectionPool.new { Redis.new }) do
273
+ FooWorker.perform_async
274
+ BarWorker.perform_async
275
+ end
276
+ ```
277
+ **Sharding support does require a breaking change to client-side
278
+ middleware, see 3.0-Upgrade.md.**
279
+ - New Chinese, Greek, Swedish and Czech translations for the Web UI.
280
+ - Updated most languages translations for the new UI features.
281
+ - **Remove official Capistrano integration** - this integration has been
282
+ moved into the [capistrano-sidekiq](https://github.com/seuros/capistrano-sidekiq) gem.
283
+ - **Remove official support for MRI 1.9** - Things still might work but
284
+ I no longer actively test on it.
285
+ - **Remove built-in support for Redis-to-Go**.
286
+ Heroku users: `heroku config:set REDIS_PROVIDER=REDISTOGO_URL`
287
+ - **Remove built-in error integration for Airbrake, Honeybadger, ExceptionNotifier and Exceptional**.
288
+ Each error gem should provide its own Sidekiq integration. Update your error gem to the latest
289
+ version to pick up Sidekiq support.
290
+ - Upgrade to connection\_pool 2.0 which now creates connections lazily.
291
+ - Remove deprecated Sidekiq::Client.registered\_\* APIs
292
+ - Remove deprecated support for the old Sidekiq::Worker#retries\_exhausted method.
293
+ - Removed 'sidekiq/yaml\_patch', this was never documented or recommended.
294
+ - Removed --profile option, #1592
295
+ - Remove usage of the term 'Worker' in the UI for clarity. Users would call both threads and
296
+ processes 'workers'. Instead, use "Thread", "Process" or "Job".
297
+
298
+ 2.17.7
299
+ -----------
300
+
301
+ - Auto-prune jobs older than one hour from the Workers page [#1508]
302
+ - Add Sidekiq::Workers#prune which can perform the auto-pruning.
303
+ - Fix issue where a job could be lost when an exception occurs updating
304
+ Redis stats before the job executes [#1511]
305
+
306
+ 2.17.6
307
+ -----------
308
+
309
+ - Fix capistrano integration due to missing pidfile. [#1490]
310
+
311
+ 2.17.5
312
+ -----------
313
+
314
+ - Automatically use the config file found at `config/sidekiq.yml`, if not passed `-C`. [#1481]
315
+ - Store 'retried\_at' and 'failed\_at' timestamps as Floats, not Strings. [#1473]
316
+ - A `USR2` signal will now reopen _all_ logs, using IO#reopen. Thus, instead of creating a new Logger object,
317
+ Sidekiq will now just update the existing Logger's file descriptor [#1163].
318
+ - Remove pidfile when shutting down if started with `-P` [#1470]
319
+
320
+ 2.17.4
321
+ -----------
322
+
323
+ - Fix JID support in inline testing, #1454
324
+ - Polish worker arguments display in UI, #1453
325
+ - Marshal arguments fully to avoid worker mutation, #1452
326
+ - Support reverse paging sorted sets, #1098
327
+
328
+
329
+ 2.17.3
330
+ -----------
331
+
332
+ - Synchronously terminates the poller and fetcher to fix a race condition in bulk requeue during shutdown [#1406]
333
+
334
+ 2.17.2
335
+ -----------
336
+
337
+ - Fix bug where strictly prioritized queues might be processed out of
338
+ order [#1408]. A side effect of this change is that it breaks a queue
339
+ declaration syntax that worked, although only because of a bug—it was
340
+ never intended to work and never supported. If you were declaring your
341
+ queues as a comma-separated list, e.g. `sidekiq -q critical,default,low`,
342
+ you must now use the `-q` flag before each queue, e.g.
343
+ `sidekiq -q critical -q default -q low`.
344
+
345
+ 2.17.1
346
+ -----------
347
+
348
+ - Expose `delay` extension as `sidekiq_delay` also. This allows you to
349
+ run Delayed::Job and Sidekiq in the same process, selectively porting
350
+ `delay` calls to `sidekiq_delay`. You just need to ensure that
351
+ Sidekiq is required **before** Delayed::Job in your Gemfile. [#1393]
352
+ - Bump redis client required version to 3.0.6
353
+ - Minor CSS fixes for Web UI
354
+
355
+ 2.17.0
356
+ -----------
357
+
358
+ - Change `Sidekiq::Client#push_bulk` to return an array of pushed `jid`s. [#1315, barelyknown]
359
+ - Web UI refactoring to use more API internally (yummy dogfood!)
360
+ - Much faster Sidekiq::Job#delete performance for larger queue sizes
361
+ - Further capistrano 3 fixes
362
+ - Many misc minor fixes
363
+
364
+ 2.16.1
365
+ -----------
366
+
367
+ - Revert usage of `resolv-replace`. MRI's native DNS lookup releases the GIL.
368
+ - Fix several Capistrano 3 issues
369
+ - Escaping dynamic data like job args and error messages in Sidekiq Web UI. [#1299, lian]
370
+
371
+ 2.16.0
372
+ -----------
373
+
374
+ - Deprecate `Sidekiq::Client.registered_workers` and `Sidekiq::Client.registered_queues`
375
+ - Refactor Sidekiq::Client to be instance-based [#1279]
376
+ - Pass all Redis options to the Redis driver so Unix sockets
377
+ can be fully configured. [#1270, salimane]
378
+ - Allow sidekiq-web extensions to add locale paths so extensions
379
+ can be localized. [#1261, ondrejbartas]
380
+ - Capistrano 3 support [#1254, phallstrom]
381
+ - Use Ruby's `resolv-replace` to enable pure Ruby DNS lookups.
382
+ This ensures that any DNS resolution that takes place in worker
383
+ threads won't lock up the entire VM on MRI. [#1258]
384
+
385
+ 2.15.2
386
+ -----------
387
+
388
+ - Iterating over Sidekiq::Queue and Sidekiq::SortedSet will now work as
389
+ intended when jobs are deleted [#866, aackerman]
390
+ - A few more minor Web UI fixes [#1247]
391
+
392
+ 2.15.1
393
+ -----------
394
+
395
+ - Fix several Web UI issues with the Bootstrap 3 upgrade.
396
+
397
+ 2.15.0
398
+ -----------
399
+
400
+ - The Core Sidekiq actors are now monitored. If any crash, the
401
+ Sidekiq process logs the error and exits immediately. This is to
402
+ help prevent "stuck" Sidekiq processes which are running but don't
403
+ appear to be doing any work. [#1194]
404
+ - Sidekiq's testing behavior is now dynamic. You can choose between
405
+ `inline` and `fake` behavior in your tests. See
406
+ [Testing](https://github.com/mperham/sidekiq/wiki/Testing) for detail. [#1193]
407
+ - The Retries table has a new column for the error message.
408
+ - The Web UI topbar now contains the status and live poll button.
409
+ - Orphaned worker records are now auto-vacuumed when you vist the
410
+ Workers page in the Web UI.
411
+ - Sidekiq.default\_worker\_options allows you to configure default
412
+ options for all Sidekiq worker types.
413
+
414
+ ```ruby
415
+ Sidekiq.default_worker_options = { 'queue' => 'default', 'backtrace' => true }
416
+ ```
417
+ - Added two Sidekiq::Client class methods for compatibility with resque-scheduler:
418
+ `enqueue_to_in` and `enqueue_in` [#1212]
419
+ - Upgrade Web UI to Bootstrap 3.0. [#1211, jeffboek]
420
+
421
+ 2.14.1
422
+ -----------
423
+
424
+ - Fix misc Web UI issues due to ERB conversion.
425
+ - Bump redis-namespace version due to security issue.
426
+
427
+ 2.14.0
428
+ -----------
429
+
430
+ - Removed slim gem dependency, Web UI now uses ERB [Locke23rus, #1120]
431
+ - Fix more race conditions in Web UI actions
432
+ - Don't reset Job enqueued\_at when retrying
433
+ - Timestamp tooltips in the Web UI should use UTC
434
+ - Fix invalid usage of handle\_exception causing issues in Airbrake
435
+ [#1134]
436
+
437
+
438
+ 2.13.1
439
+ -----------
440
+
441
+ - Make Sidekiq::Middleware::Chain Enumerable
442
+ - Make summary bar and graphs responsive [manishval, #1025]
443
+ - Adds a job status page for scheduled jobs [jonhyman]
444
+ - Handle race condition in retrying and deleting jobs in the Web UI
445
+ - The Web UI relative times are now i18n. [MadRabbit, #1088]
446
+ - Allow for default number of retry attempts to be set for
447
+ `Sidekiq::Middleware::Server::RetryJobs` middleware. [czarneckid] [#1091]
448
+
449
+ ```ruby
450
+ Sidekiq.configure_server do |config|
451
+ config.server_middleware do |chain|
452
+ chain.add Sidekiq::Middleware::Server::RetryJobs, :max_retries => 10
453
+ end
454
+ end
455
+ ```
456
+
457
+
458
+ 2.13.0
459
+ -----------
460
+
461
+ - Adding button to move scheduled job to main queue [guiceolin, #1020]
462
+ - fix i18n support resetting saved locale when job is retried [#1011]
463
+ - log rotation via USR2 now closes the old logger [#1008]
464
+ - Add ability to customize retry schedule, like so [jmazzi, #1027]
465
+
466
+ ```ruby
467
+ class MyWorker
468
+ include Sidekiq::Worker
469
+ sidekiq_retry_in { |count| count * 2 }
470
+ end
471
+ ```
472
+ - Redesign Worker#retries\_exhausted callback to use same form as above [jmazzi, #1030]
473
+
474
+ ```ruby
475
+ class MyWorker
476
+ include Sidekiq::Worker
477
+ sidekiq_retries_exhausted do |msg|
478
+ Rails.logger.error "Failed to process #{msg['class']} with args: #{msg['args']}"
479
+ end
480
+ end
481
+ ```
482
+
483
+ 2.12.4
484
+ -----------
485
+
486
+ - Fix error in previous release which crashed the Manager when a
487
+ Processor died.
488
+
489
+ 2.12.3
490
+ -----------
491
+
492
+ - Revert back to Celluloid's TaskFiber for job processing which has proven to be more
493
+ stable than TaskThread. [#985]
494
+ - Avoid possible lockup during hard shutdown [#997]
495
+
496
+ At this point, if you are experiencing stability issues with Sidekiq in
497
+ Ruby 1.9, please try Ruby 2.0. It seems to be more stable.
498
+
499
+ 2.12.2
500
+ -----------
501
+
502
+ - Relax slim version requirement to >= 1.1.0
503
+ - Refactor historical stats to use TTL, not explicit cleanup. [grosser, #971]
504
+
505
+ 2.12.1
506
+ -----------
507
+
508
+ - Force Celluloid 0.14.1 as 0.14.0 has a serious bug. [#954]
509
+ - Scheduled and Retry jobs now use Sidekiq::Client to push
510
+ jobs onto the queue, so they use client middleware. [dimko, #948]
511
+ - Record the timestamp when jobs are enqueued. Add
512
+ Sidekiq::Job#enqueued\_at to query the time. [mariovisic, #944]
513
+ - Add Sidekiq::Queue#latency - calculates diff between now and
514
+ enqueued\_at for the oldest job in the queue.
515
+ - Add testing method `perform_one` that dequeues and performs a single job.
516
+ This is mainly to aid testing jobs that spawn other jobs. [fumin, #963]
517
+
518
+ 2.12.0
519
+ -----------
520
+
521
+ - Upgrade to Celluloid 0.14, remove the use of Celluloid's thread
522
+ pool. This should halve the number of threads in each Sidekiq
523
+ process, thus requiring less resources. [#919]
524
+ - Abstract Celluloid usage to Sidekiq::Actor for testing purposes.
525
+ - Better handling for Redis downtime when fetching jobs and shutting
526
+ down, don't print exceptions every second and print success message
527
+ when Redis is back.
528
+ - Fix unclean shutdown leading to duplicate jobs [#897]
529
+ - Add Korean locale [#890]
530
+ - Upgrade test suite to Minitest 5
531
+ - Remove usage of `multi_json` as `json` is now robust on all platforms.
532
+
533
+ 2.11.2
534
+ -----------
535
+
536
+ - Fix Web UI when used without Rails [#886]
537
+ - Add Sidekiq::Stats#reset [#349]
538
+ - Add Norwegian locale.
539
+ - Updates for the JA locale.
540
+
541
+ 2.11.1
542
+ -----------
543
+
544
+ - Fix timeout warning.
545
+ - Add Dutch web UI locale.
546
+
547
+ 2.11.0
548
+ -----------
549
+
550
+ - Upgrade to Celluloid 0.13. [#834]
551
+ - Remove **timeout** support from `sidekiq_options`. Ruby's timeout
552
+ is inherently unsafe in a multi-threaded application and was causing
553
+ stability problems for many. See http://bit.ly/OtYpK
554
+ - Add Japanese locale for Web UI [#868]
555
+ - Fix a few issues with Web UI i18n.
556
+
557
+ 2.10.1
558
+ -----------
559
+
560
+ - Remove need for the i18n gem. (brandonhilkert)
561
+ - Improve redis connection info logging on startup for debugging
562
+ purposes [#858]
563
+ - Revert sinatra/slim as runtime dependencies
564
+ - Add `find_job` method to sidekiq/api
565
+
566
+
567
+ 2.10.0
568
+ -----------
569
+
570
+ - Refactor algorithm for putting scheduled jobs onto the queue [#843]
571
+ - Fix scheduler thread dying due to incorrect error handling [#839]
572
+ - Fix issue which left stale workers if Sidekiq wasn't shutdown while
573
+ quiet. [#840]
574
+ - I18n for web UI. Please submit translations of `web/locales/en.yml` for
575
+ your own language. [#811]
576
+ - 'sinatra', 'slim' and 'i18n' are now gem dependencies for Sidekiq.
577
+
578
+
579
+ 2.9.0
580
+ -----------
581
+
582
+ - Update 'sidekiq/testing' to work with any Sidekiq::Client call. It
583
+ also serializes the arguments as using Redis would. [#713]
584
+ - Raise a Sidekiq::Shutdown error within workers which don't finish within the hard
585
+ timeout. This is to prevent unwanted database transaction commits. [#377]
586
+ - Lazy load Redis connection pool, you no longer need to specify
587
+ anything in Passenger or Unicorn's after_fork callback [#794]
588
+ - Add optional Worker#retries_exhausted hook after max retries failed. [jkassemi, #780]
589
+ - Fix bug in pagination link to last page [pitr, #774]
590
+ - Upstart scripts for multiple Sidekiq instances [dariocravero, #763]
591
+ - Use select via pipes instead of poll to catch signals [mrnugget, #761]
592
+
593
+ 2.8.0
594
+ -----------
595
+
596
+ - I18n support! Sidekiq can optionally save and restore the Rails locale
597
+ so it will be properly set when your jobs execute. Just include
598
+ `require 'sidekiq/middleware/i18n'` in your sidekiq initializer. [#750]
599
+ - Fix bug which could lose messages when using namespaces and the message
600
+ needs to be requeued in Redis. [#744]
601
+ - Refactor Redis namespace support [#747]. The redis namespace can no longer be
602
+ passed via the config file, the only supported way is via Ruby in your
603
+ initializer:
604
+
605
+ ```ruby
606
+ sidekiq_redis = { :url => 'redis://localhost:3679', :namespace => 'foo' }
607
+ Sidekiq.configure_server { |config| config.redis = sidekiq_redis }
608
+ Sidekiq.configure_client { |config| config.redis = sidekiq_redis }
609
+ ```
610
+
611
+ A warning is printed out to the log if a namespace is found in your sidekiq.yml.
612
+
613
+
614
+ 2.7.5
615
+ -----------
616
+
617
+ - Capistrano no longer uses daemonization in order to work with JRuby [#719]
618
+ - Refactor signal handling to work on Ruby 2.0 [#728, #730]
619
+ - Fix dashboard refresh URL [#732]
620
+
621
+ 2.7.4
622
+ -----------
623
+
624
+ - Fixed daemonization, was broken by some internal refactoring in 2.7.3 [#727]
625
+
626
+ 2.7.3
627
+ -----------
628
+
629
+ - Real-time dashboard is now the default web page
630
+ - Make config file optional for capistrano
631
+ - Fix Retry All button in the Web UI
632
+
633
+ 2.7.2
634
+ -----------
635
+
636
+ - Remove gem signing infrastructure. It was causing Sidekiq to break
637
+ when used via git in Bundler. This is why we can't have nice things. [#688]
638
+
639
+
640
+ 2.7.1
641
+ -----------
642
+
643
+ - Fix issue with hard shutdown [#680]
644
+
645
+
646
+ 2.7.0
647
+ -----------
648
+
649
+ - Add -d daemonize flag, capistrano recipe has been updated to use it [#662]
650
+ - Support profiling via `ruby-prof` with -p. When Sidekiq is stopped
651
+ via Ctrl-C, it will output `profile.html`. You must add `gem 'ruby-prof'` to your Gemfile for it to work.
652
+ - Dynamically update Redis stats on dashboard [brandonhilkert]
653
+ - Add Sidekiq::Workers API giving programmatic access to the current
654
+ set of active workers.
655
+
656
+ ```
657
+ workers = Sidekiq::Workers.new
658
+ workers.size => 2
659
+ workers.each do |name, work|
660
+ # name is a unique identifier per Processor instance
661
+ # work is a Hash which looks like:
662
+ # { 'queue' => name, 'run_at' => timestamp, 'payload' => msg }
663
+ end
664
+ ```
665
+
666
+ - Allow environment-specific sections within the config file which
667
+ override the global values [dtaniwaki, #630]
668
+
669
+ ```
670
+ ---
671
+ :concurrency: 50
672
+ :verbose: false
673
+ staging:
674
+ :verbose: true
675
+ :concurrency: 5
676
+ ```
677
+
678
+
679
+ 2.6.5
680
+ -----------
681
+
682
+ - Several reliability fixes for job requeueing upon termination [apinstein, #622, #624]
683
+ - Fix typo in capistrano recipe
684
+ - Add `retry_queue` option so retries can be given lower priority [ryanlower, #620]
685
+
686
+ ```ruby
687
+ sidekiq_options queue: 'high', retry_queue: 'low'
688
+ ```
689
+
690
+ 2.6.4
691
+ -----------
692
+
693
+ - Fix crash upon empty queue [#612]
694
+
695
+ 2.6.3
696
+ -----------
697
+
698
+ - sidekiqctl exits with non-zero exit code upon error [jmazzi]
699
+ - better argument validation in Sidekiq::Client [karlfreeman]
700
+
701
+ 2.6.2
702
+ -----------
703
+
704
+ - Add Dashboard beacon indicating when stats are updated. [brandonhilkert, #606]
705
+ - Revert issue with capistrano restart. [#598]
706
+
707
+ 2.6.1
708
+ -----------
709
+
710
+ - Dashboard now live updates summary stats also. [brandonhilkert, #605]
711
+ - Add middleware chain APIs `insert_before` and `insert_after` for fine
712
+ tuning the order of middleware. [jackrg, #595]
713
+
714
+ 2.6.0
715
+ -----------
716
+
717
+ - Web UI much more mobile friendly now [brandonhilkert, #573]
718
+ - Enable live polling for every section in Web UI [brandonhilkert, #567]
719
+ - Add Stats API [brandonhilkert, #565]
720
+ - Add Stats::History API [brandonhilkert, #570]
721
+ - Add Dashboard to Web UI with live and historical stat graphs [brandonhilkert, #580]
722
+ - Add option to log output to a file, reopen log file on USR2 signal [mrnugget, #581]
723
+
724
+ 2.5.4
725
+ -----------
726
+
727
+ - `Sidekiq::Client.push` now accepts the worker class as a string so the
728
+ Sidekiq client does not have to load your worker classes at all. [#524]
729
+ - `Sidekiq::Client.push_bulk` now works with inline testing.
730
+ - **Really** fix status icon in Web UI this time.
731
+ - Add "Delete All" and "Retry All" buttons to Retries in Web UI
732
+
733
+
734
+ 2.5.3
735
+ -----------
736
+
737
+ - Small Web UI fixes
738
+ - Add `delay_until` so you can delay jobs until a specific timestamp:
739
+
740
+ ```ruby
741
+ Auction.delay_until(@auction.ends_at).close(@auction.id)
742
+ ```
743
+
744
+ This is identical to the existing Sidekiq::Worker method, `perform_at`.
745
+
746
+ 2.5.2
747
+ -----------
748
+
749
+ - Remove asset pipeline from Web UI for much faster, simpler runtime. [#499, #490, #481]
750
+ - Add -g option so the procline better identifies a Sidekiq process, defaults to File.basename(Rails.root). [#486]
751
+
752
+ sidekiq 2.5.1 myapp [0 of 25 busy]
753
+
754
+ - Add splay to retry time so groups of failed jobs don't fire all at once. [#483]
755
+
756
+ 2.5.1
757
+ -----------
758
+
759
+ - Fix issues with core\_ext
760
+
761
+ 2.5.0
762
+ -----------
763
+
764
+ - REDESIGNED WEB UI! [unity, cavneb]
765
+ - Support Honeybadger for error delivery
766
+ - Inline testing runs the client middleware before executing jobs [#465]
767
+ - Web UI can now remove jobs from queue. [#466, dleung]
768
+ - Web UI can now show the full message, not just 100 chars [#464, dleung]
769
+ - Add APIs for manipulating the retry and job queues. See sidekiq/api. [#457]
770
+
771
+
772
+ 2.4.0
773
+ -----------
774
+
775
+ - ActionMailer.delay.method now only tries to deliver if method returns a valid message.
776
+ - Logging now uses "MSG-#{Job ID}", not a random msg ID
777
+ - Allow generic Redis provider as environment variable. [#443]
778
+ - Add ability to customize sidekiq\_options with delay calls [#450]
779
+
780
+ ```ruby
781
+ Foo.delay(:retry => false).bar
782
+ Foo.delay(:retry => 10).bar
783
+ Foo.delay(:timeout => 10.seconds).bar
784
+ Foo.delay_for(5.minutes, :timeout => 10.seconds).bar
785
+ ```
786
+
787
+ 2.3.3
788
+ -----------
789
+
790
+ - Remove option to disable Rails hooks. [#401]
791
+ - Allow delay of any module class method
792
+
793
+ 2.3.2
794
+ -----------
795
+
796
+ - Fix retry. 2.3.1 accidentally disabled it.
797
+
798
+ 2.3.1
799
+ -----------
800
+
801
+ - Add Sidekiq::Client.push\_bulk for bulk adding of jobs to Redis.
802
+ My own simple test case shows pushing 10,000 jobs goes from 5 sec to 1.5 sec.
803
+ - Add support for multiple processes per host to Capistrano recipe
804
+ - Re-enable Celluloid::Actor#defer to fix stack overflow issues [#398]
805
+
806
+ 2.3.0
807
+ -----------
808
+
809
+ - Upgrade Celluloid to 0.12
810
+ - Upgrade Twitter Bootstrap to 2.1.0
811
+ - Rescue more Exceptions
812
+ - Change Job ID to be Hex, rather than Base64, for HTTP safety
813
+ - Use `Airbrake#notify_or_ignore`
814
+
815
+ 2.2.1
816
+ -----------
817
+
818
+ - Add support for custom tabs to Sidekiq::Web [#346]
819
+ - Change capistrano recipe to run 'quiet' before deploy:update\_code so
820
+ it is run upon both 'deploy' and 'deploy:migrations'. [#352]
821
+ - Rescue Exception rather than StandardError to catch and log any sort
822
+ of Processor death.
823
+
824
+ 2.2.0
825
+ -----------
826
+
827
+ - Roll back Celluloid optimizations in 2.1.0 which caused instability.
828
+ - Add extension to delay any arbitrary class method to Sidekiq.
829
+ Previously this was limited to ActiveRecord classes.
830
+
831
+ ```ruby
832
+ SomeClass.delay.class_method(1, 'mike', Date.today)
833
+ ```
834
+
835
+ - Sidekiq::Client now generates and returns a random, 128-bit Job ID 'jid' which
836
+ can be used to track the processing of a Job, e.g. for calling back to a webhook
837
+ when a job is finished.
838
+
839
+ 2.1.1
840
+ -----------
841
+
842
+ - Handle networking errors causing the scheduler thread to die [#309]
843
+ - Rework exception handling to log all Processor and actor death (#325, subelsky)
844
+ - Clone arguments when calling worker so modifications are discarded. (#265, hakanensari)
845
+
846
+ 2.1.0
847
+ -----------
848
+
849
+ - Tune Celluloid to no longer run message processing within a Fiber.
850
+ This gives us a full Thread stack and also lowers Sidekiq's memory
851
+ usage.
852
+ - Add pagination within the Web UI [#253]
853
+ - Specify which Redis driver to use: *hiredis* or *ruby* (default)
854
+ - Remove FailureJobs and UniqueJobs, which were optional middleware
855
+ that I don't want to support in core. [#302]
856
+
857
+ 2.0.3
858
+ -----------
859
+ - Fix sidekiq-web's navbar on mobile devices and windows under 980px (ezkl)
860
+ - Fix Capistrano task for first deploys [#259]
861
+ - Worker subclasses now properly inherit sidekiq\_options set in
862
+ their superclass [#221]
863
+ - Add random jitter to scheduler to spread polls across POLL\_INTERVAL
864
+ window. [#247]
865
+ - Sidekiq has a new mailing list: sidekiq@librelist.org See README.
866
+
867
+ 2.0.2
868
+ -----------
869
+
870
+ - Fix "Retry Now" button on individual retry page. (ezkl)
871
+
872
+ 2.0.1
873
+ -----------
874
+
875
+ - Add "Clear Workers" button to UI. If you kill -9 Sidekiq, the workers
876
+ set can fill up with stale entries.
877
+ - Update sidekiq/testing to support new scheduled jobs API:
878
+
879
+ ```ruby
880
+ require 'sidekiq/testing'
881
+ DirectWorker.perform_in(10.seconds, 1, 2)
882
+ assert_equal 1, DirectWorker.jobs.size
883
+ assert_in_delta 10.seconds.from_now.to_f, DirectWorker.jobs.last['at'], 0.01
884
+ ```
885
+
886
+ 2.0.0
887
+ -----------
888
+
889
+ - **SCHEDULED JOBS**!
890
+
891
+ You can now use `perform_at` and `perform_in` to schedule jobs
892
+ to run at arbitrary points in the future, like so:
893
+
894
+ ```ruby
895
+ SomeWorker.perform_in(5.days, 'bob', 13)
896
+ SomeWorker.perform_at(5.days.from_now, 'bob', 13)
897
+ ```
898
+
899
+ It also works with the delay extensions:
900
+
901
+ ```ruby
902
+ UserMailer.delay_for(5.days).send_welcome_email(user.id)
903
+ ```
904
+
905
+ The time is approximately when the job will be placed on the queue;
906
+ it is not guaranteed to run at precisely at that moment in time.
907
+
908
+ This functionality is meant for one-off, arbitrary jobs. I still
909
+ recommend `whenever` or `clockwork` if you want cron-like,
910
+ recurring jobs. See `examples/scheduling.rb`
911
+
912
+ I want to specially thank @yabawock for his work on sidekiq-scheduler.
913
+ His extension for Sidekiq 1.x filled an obvious functional gap that I now think is
914
+ useful enough to implement in Sidekiq proper.
915
+
916
+ - Fixed issues due to Redis 3.x API changes. Sidekiq now requires
917
+ the Redis 3.x client.
918
+ - Inline testing now round trips arguments through JSON to catch
919
+ serialization issues (betelgeuse)
920
+
921
+ 1.2.1
922
+ -----------
923
+
924
+ - Sidekiq::Worker now has access to Sidekiq's standard logger
925
+ - Fix issue with non-StandardErrors leading to Processor exhaustion
926
+ - Fix issue with Fetcher slowing Sidekiq shutdown
927
+ - Print backtraces for all threads upon TTIN signal [#183]
928
+ - Overhaul retries Web UI with new index page and bulk operations [#184]
929
+
930
+ 1.2.0
931
+ -----------
932
+
933
+ - Full or partial error backtraces can optionally be stored as part of the retry
934
+ for display in the web UI if you aren't using an error service. [#155]
935
+
936
+ ```ruby
937
+ class Worker
938
+ include Sidekiq::Worker
939
+ sidekiq_options :backtrace => [true || 10]
940
+ end
941
+ ```
942
+ - Add timeout option to kill a worker after N seconds (blackgold9)
943
+
944
+ ```ruby
945
+ class HangingWorker
946
+ include Sidekiq::Worker
947
+ sidekiq_options :timeout => 600
948
+ def perform
949
+ # will be killed if it takes longer than 10 minutes
950
+ end
951
+ end
952
+ ```
953
+
954
+ - Fix delayed extensions not available in workers [#152]
955
+ - In test environments add the `#drain` class method to workers. This method
956
+ executes all previously queued jobs. (panthomakos)
957
+ - Sidekiq workers can be run inline during tests, just `require 'sidekiq/testing/inline'` (panthomakos)
958
+ - Queues can now be deleted from the Sidekiq web UI [#154]
959
+ - Fix unnecessary shutdown delay due to Retry Poller [#174]
960
+
961
+ 1.1.4
962
+ -----------
963
+
964
+ - Add 24 hr expiry for basic keys set in Redis, to avoid any possible leaking.
965
+ - Only register workers in Redis while working, to avoid lingering
966
+ workers [#156]
967
+ - Speed up shutdown significantly.
968
+
969
+ 1.1.3
970
+ -----------
971
+
972
+ - Better network error handling when fetching jobs from Redis.
973
+ Sidekiq will retry once per second until it can re-establish
974
+ a connection. (ryanlecompte)
975
+ - capistrano recipe now uses `bundle_cmd` if set [#147]
976
+ - handle multi\_json API changes (sferik)
977
+
978
+ 1.1.2
979
+ -----------
980
+
981
+ - Fix double restart with cap deploy [#137]
982
+
983
+ 1.1.1
984
+ -----------
985
+
986
+ - Set procline for easy monitoring of Sidekiq status via "ps aux"
987
+ - Fix race condition on shutdown [#134]
988
+ - Fix hang with cap sidekiq:start [#131]
989
+
990
+ 1.1.0
991
+ -----------
992
+
993
+ - The Sidekiq license has switched from GPLv3 to LGPLv3!
994
+ - Sidekiq::Client.push now returns whether the actual Redis
995
+ operation succeeded or not. [#123]
996
+ - Remove UniqueJobs from the default middleware chain. Its
997
+ functionality, while useful, is unexpected for new Sidekiq
998
+ users. You can re-enable it with the following config.
999
+ Read #119 for more discussion.
1000
+
1001
+ ```ruby
1002
+ Sidekiq.configure_client do |config|
1003
+ require 'sidekiq/middleware/client/unique_jobs'
1004
+ config.client_middleware do |chain|
1005
+ chain.add Sidekiq::Middleware::Client::UniqueJobs
1006
+ end
1007
+ end
1008
+ Sidekiq.configure_server do |config|
1009
+ require 'sidekiq/middleware/server/unique_jobs'
1010
+ config.server_middleware do |chain|
1011
+ chain.add Sidekiq::Middleware::Server::UniqueJobs
1012
+ end
1013
+ end
1014
+ ```
1015
+
1016
+ 1.0.0
1017
+ -----------
1018
+
1019
+ Thanks to all Sidekiq users and contributors for helping me
1020
+ get to this big milestone!
1021
+
1022
+ - Default concurrency on client-side to 5, not 25 so we don't
1023
+ create as many unused Redis connections, same as ActiveRecord's
1024
+ default pool size.
1025
+ - Ensure redis= is given a Hash or ConnectionPool.
1026
+
1027
+ 0.11.2
1028
+ -----------
1029
+
1030
+ - Implement "safe shutdown". The messages for any workers that
1031
+ are still busy when we hit the TERM timeout will be requeued in
1032
+ Redis so the messages are not lost when the Sidekiq process exits.
1033
+ [#110]
1034
+ - Work around Celluloid's small 4kb stack limit [#115]
1035
+ - Add support for a custom Capistrano role to limit Sidekiq to
1036
+ a set of machines. [#113]
1037
+
1038
+ 0.11.1
1039
+ -----------
1040
+
1041
+ - Fix fetch breaking retry when used with Redis namespaces. [#109]
1042
+ - Redis connection now just a plain ConnectionPool, not CP::Wrapper.
1043
+ - Capistrano initial deploy fix [#106]
1044
+ - Re-implemented weighted queues support (ryanlecompte)
1045
+
1046
+ 0.11.0
1047
+ -----------
1048
+
1049
+ - Client-side API changes, added sidekiq\_options for Sidekiq::Worker.
1050
+ As a side effect of this change, the client API works on Ruby 1.8.
1051
+ It's not officially supported but should work [#103]
1052
+ - NO POLL! Sidekiq no longer polls Redis, leading to lower network
1053
+ utilization and lower latency for message processing.
1054
+ - Add --version CLI option
1055
+
1056
+ 0.10.1
1057
+ -----------
1058
+
1059
+ - Add details page for jobs in retry queue (jcoene)
1060
+ - Display relative timestamps in web interface (jcoene)
1061
+ - Capistrano fixes (hinrik, bensie)
1062
+
1063
+ 0.10.0
1064
+ -----------
1065
+
1066
+ - Reworked capistrano recipe to make it more fault-tolerant [#94].
1067
+ - Automatic failure retry! Sidekiq will now save failed messages
1068
+ and retry them, with an exponential backoff, over about 20 days.
1069
+ Did a message fail to process? Just deploy a bug fix in the next
1070
+ few days and Sidekiq will retry the message eventually.
1071
+
1072
+ 0.9.1
1073
+ -----------
1074
+
1075
+ - Fix missed deprecations, poor method name in web UI
1076
+
1077
+ 0.9.0
1078
+ -----------
1079
+
1080
+ - Add -t option to configure the TERM shutdown timeout
1081
+ - TERM shutdown timeout is now configurable, defaults to 5 seconds.
1082
+ - USR1 signal now stops Sidekiq from accepting new work,
1083
+ capistrano sends USR1 at start of deploy and TERM at end of deploy
1084
+ giving workers the maximum amount of time to finish.
1085
+ - New Sidekiq::Web rack application available
1086
+ - Updated Sidekiq.redis API
1087
+
1088
+ 0.8.0
1089
+ -----------
1090
+
1091
+ - Remove :namespace and :server CLI options (mperham)
1092
+ - Add ExceptionNotifier support (masterkain)
1093
+ - Add capistrano support (mperham)
1094
+ - Workers now log upon start and finish (mperham)
1095
+ - Messages for terminated workers are now automatically requeued (mperham)
1096
+ - Add support for Exceptional error reporting (bensie)
1097
+
1098
+ 0.7.0
1099
+ -----------
1100
+
1101
+ - Example chef recipe and monitrc script (jc00ke)
1102
+ - Refactor global configuration into Sidekiq.configure\_server and
1103
+ Sidekiq.configure\_client blocks. (mperham)
1104
+ - Add optional middleware FailureJobs which saves failed jobs to a
1105
+ 'failed' queue (fbjork)
1106
+ - Upon shutdown, workers are now terminated after 5 seconds. This is to
1107
+ meet Heroku's hard limit of 10 seconds for a process to shutdown. (mperham)
1108
+ - Refactor middleware API for simplicity, see sidekiq/middleware/chain. (mperham)
1109
+ - Add `delay` extensions for ActionMailer and ActiveRecord. (mperham)
1110
+ - Added config file support. See test/config.yml for an example file. (jc00ke)
1111
+ - Added pidfile for tools like monit (jc00ke)
1112
+
1113
+ 0.6.0
1114
+ -----------
1115
+
1116
+ - Resque-compatible processing stats in redis (mperham)
1117
+ - Simple client testing support in sidekiq/testing (mperham)
1118
+ - Plain old Ruby support via the -r cli flag (mperham)
1119
+ - Refactored middleware support, introducing ability to add client-side middleware (ryanlecompte)
1120
+ - Added middleware for ignoring duplicate jobs (ryanlecompte)
1121
+ - Added middleware for displaying jobs in resque-web dashboard (maxjustus)
1122
+ - Added redis namespacing support (maxjustus)
1123
+
1124
+ 0.5.1
1125
+ -----------
1126
+
1127
+ - Initial release!