sidekiq 5.0.0

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 (116) hide show
  1. checksums.yaml +7 -0
  2. data/.github/contributing.md +32 -0
  3. data/.github/issue_template.md +9 -0
  4. data/.gitignore +13 -0
  5. data/.travis.yml +18 -0
  6. data/3.0-Upgrade.md +70 -0
  7. data/4.0-Upgrade.md +53 -0
  8. data/5.0-Upgrade.md +56 -0
  9. data/COMM-LICENSE +95 -0
  10. data/Changes.md +1402 -0
  11. data/Ent-Changes.md +174 -0
  12. data/Gemfile +29 -0
  13. data/LICENSE +9 -0
  14. data/Pro-2.0-Upgrade.md +138 -0
  15. data/Pro-3.0-Upgrade.md +44 -0
  16. data/Pro-Changes.md +632 -0
  17. data/README.md +107 -0
  18. data/Rakefile +12 -0
  19. data/bin/sidekiq +18 -0
  20. data/bin/sidekiqctl +99 -0
  21. data/bin/sidekiqload +149 -0
  22. data/code_of_conduct.md +50 -0
  23. data/lib/generators/sidekiq/templates/worker.rb.erb +9 -0
  24. data/lib/generators/sidekiq/templates/worker_spec.rb.erb +6 -0
  25. data/lib/generators/sidekiq/templates/worker_test.rb.erb +8 -0
  26. data/lib/generators/sidekiq/worker_generator.rb +49 -0
  27. data/lib/sidekiq.rb +228 -0
  28. data/lib/sidekiq/api.rb +871 -0
  29. data/lib/sidekiq/cli.rb +413 -0
  30. data/lib/sidekiq/client.rb +238 -0
  31. data/lib/sidekiq/core_ext.rb +119 -0
  32. data/lib/sidekiq/delay.rb +21 -0
  33. data/lib/sidekiq/exception_handler.rb +31 -0
  34. data/lib/sidekiq/extensions/action_mailer.rb +57 -0
  35. data/lib/sidekiq/extensions/active_record.rb +40 -0
  36. data/lib/sidekiq/extensions/class_methods.rb +40 -0
  37. data/lib/sidekiq/extensions/generic_proxy.rb +31 -0
  38. data/lib/sidekiq/fetch.rb +81 -0
  39. data/lib/sidekiq/job_logger.rb +27 -0
  40. data/lib/sidekiq/job_retry.rb +235 -0
  41. data/lib/sidekiq/launcher.rb +167 -0
  42. data/lib/sidekiq/logging.rb +106 -0
  43. data/lib/sidekiq/manager.rb +138 -0
  44. data/lib/sidekiq/middleware/chain.rb +150 -0
  45. data/lib/sidekiq/middleware/i18n.rb +42 -0
  46. data/lib/sidekiq/middleware/server/active_record.rb +22 -0
  47. data/lib/sidekiq/paginator.rb +43 -0
  48. data/lib/sidekiq/processor.rb +238 -0
  49. data/lib/sidekiq/rails.rb +60 -0
  50. data/lib/sidekiq/redis_connection.rb +106 -0
  51. data/lib/sidekiq/scheduled.rb +147 -0
  52. data/lib/sidekiq/testing.rb +324 -0
  53. data/lib/sidekiq/testing/inline.rb +29 -0
  54. data/lib/sidekiq/util.rb +63 -0
  55. data/lib/sidekiq/version.rb +4 -0
  56. data/lib/sidekiq/web.rb +213 -0
  57. data/lib/sidekiq/web/action.rb +89 -0
  58. data/lib/sidekiq/web/application.rb +331 -0
  59. data/lib/sidekiq/web/helpers.rb +286 -0
  60. data/lib/sidekiq/web/router.rb +100 -0
  61. data/lib/sidekiq/worker.rb +144 -0
  62. data/sidekiq.gemspec +32 -0
  63. data/web/assets/images/favicon.ico +0 -0
  64. data/web/assets/images/logo.png +0 -0
  65. data/web/assets/images/status.png +0 -0
  66. data/web/assets/javascripts/application.js +92 -0
  67. data/web/assets/javascripts/dashboard.js +298 -0
  68. data/web/assets/stylesheets/application-rtl.css +246 -0
  69. data/web/assets/stylesheets/application.css +1111 -0
  70. data/web/assets/stylesheets/bootstrap-rtl.min.css +9 -0
  71. data/web/assets/stylesheets/bootstrap.css +5 -0
  72. data/web/locales/ar.yml +80 -0
  73. data/web/locales/cs.yml +78 -0
  74. data/web/locales/da.yml +68 -0
  75. data/web/locales/de.yml +69 -0
  76. data/web/locales/el.yml +68 -0
  77. data/web/locales/en.yml +79 -0
  78. data/web/locales/es.yml +69 -0
  79. data/web/locales/fa.yml +80 -0
  80. data/web/locales/fr.yml +78 -0
  81. data/web/locales/he.yml +79 -0
  82. data/web/locales/hi.yml +75 -0
  83. data/web/locales/it.yml +69 -0
  84. data/web/locales/ja.yml +78 -0
  85. data/web/locales/ko.yml +68 -0
  86. data/web/locales/nb.yml +77 -0
  87. data/web/locales/nl.yml +68 -0
  88. data/web/locales/pl.yml +59 -0
  89. data/web/locales/pt-br.yml +68 -0
  90. data/web/locales/pt.yml +67 -0
  91. data/web/locales/ru.yml +78 -0
  92. data/web/locales/sv.yml +68 -0
  93. data/web/locales/ta.yml +75 -0
  94. data/web/locales/uk.yml +76 -0
  95. data/web/locales/ur.yml +80 -0
  96. data/web/locales/zh-cn.yml +68 -0
  97. data/web/locales/zh-tw.yml +68 -0
  98. data/web/views/_footer.erb +17 -0
  99. data/web/views/_job_info.erb +88 -0
  100. data/web/views/_nav.erb +66 -0
  101. data/web/views/_paging.erb +23 -0
  102. data/web/views/_poll_link.erb +7 -0
  103. data/web/views/_status.erb +4 -0
  104. data/web/views/_summary.erb +40 -0
  105. data/web/views/busy.erb +94 -0
  106. data/web/views/dashboard.erb +75 -0
  107. data/web/views/dead.erb +34 -0
  108. data/web/views/layout.erb +40 -0
  109. data/web/views/morgue.erb +75 -0
  110. data/web/views/queue.erb +45 -0
  111. data/web/views/queues.erb +28 -0
  112. data/web/views/retries.erb +76 -0
  113. data/web/views/retry.erb +34 -0
  114. data/web/views/scheduled.erb +54 -0
  115. data/web/views/scheduled_job_info.erb +8 -0
  116. metadata +366 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f2a9cd7270e53981aaf7b3f2639596ff042f5ae3
4
+ data.tar.gz: 7b6e4fbfee794de34d9b6b15772cbf085e05a65b
5
+ SHA512:
6
+ metadata.gz: dfaecc27ce4071e36b5ab994c27f59d85b4cf7f16ca05a5b786c79125c311f58fbb38b94f7e1c71e4dbf90e6645cb358102e8940a94881981f7bbc2578fd18ff
7
+ data.tar.gz: a98e9b87e5f4abe2580ea5fcb6f20ef1d28623eae9be4ca758d5f5b52c65dbef7a6b5df74f673449177f36494b9075573315c7ef6cd6b757ba6a59e825737833
@@ -0,0 +1,32 @@
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.
@@ -0,0 +1,9 @@
1
+ Ruby version:
2
+ Sidekiq / Pro / Enterprise version(s):
3
+
4
+ Please include your initializer and any error message with the full backtrace.
5
+
6
+ Are you using an old version?
7
+ Have you checked the changelog to see if your issue has been fixed in a later version?
8
+
9
+ https://github.com/mperham/sidekiq/blob/master/Changes.md
@@ -0,0 +1,13 @@
1
+ .rvmrc
2
+ .ruby-version
3
+ tags
4
+ Gemfile.lock
5
+ *.swp
6
+ dump.rdb
7
+ .rbx
8
+ coverage/
9
+ vendor/
10
+ .bundle/
11
+ .sass-cache/
12
+ tmp/
13
+ pkg/*.gem
@@ -0,0 +1,18 @@
1
+ language: ruby
2
+ sudo: false
3
+ cache: bundler
4
+ services:
5
+ - redis-server
6
+ before_install:
7
+ - gem install bundler
8
+ - gem update bundler
9
+ matrix:
10
+ include:
11
+ - rvm: 2.2.4
12
+ env: "PERCY_ENABLE=0"
13
+ - rvm: 2.3.0
14
+ env: "PERCY_ENABLE=0"
15
+ - rvm: 2.4.0
16
+ env: "PERCY_ENABLE=1"
17
+ - rvm: jruby-9.1.6.0
18
+ env: "PERCY_ENABLE=0"
@@ -0,0 +1,70 @@
1
+ # Upgrading to Sidekiq 3.0
2
+
3
+ Sidekiq 3.0 brings several new features but also removes old APIs and
4
+ changes a few data elements in Redis. To upgrade cleanly:
5
+
6
+ * Upgrade to the latest Sidekiq 2.x and run it for a few weeks.
7
+ `gem 'sidekiq', '< 3'`
8
+ This is only needed if you have retries pending.
9
+ * 3rd party gems which use **client-side middleware** will need to update
10
+ due to an API change. The Redis connection for a particular job is
11
+ passed thru the middleware to handle sharding where jobs can
12
+ be pushed to different redis server instances.
13
+
14
+ `def call(worker_class, msg, queue, redis_pool)`
15
+
16
+ Client-side middleware should use `redis_pool.with { |conn| ... }` to
17
+ perform Redis operations and **not** `Sidekiq.redis`.
18
+ * If you used the capistrano integration, you'll need to pull in the
19
+ new [capistrano-sidekiq](https://github.com/seuros/capistrano-sidekiq)
20
+ gem and use it in your deploy.rb.
21
+ * API changes:
22
+ - `Sidekiq::Client.registered_workers` replaced by `Sidekiq::Workers.new`
23
+ - `Sidekiq::Client.registered_queues` replaced by `Sidekiq::Queue.all`
24
+ - `Sidekiq::Worker#retries_exhausted` replaced by `Sidekiq::Worker.sidekiq_retries_exhausted`
25
+ - `Sidekiq::Workers#each` has changed significantly with a reworking
26
+ of Sidekiq's internal process/thread data model.
27
+ * `sidekiq/api` is no longer automatically required. If your code uses
28
+ the API, you will need to require it.
29
+ * Redis-to-Go is no longer transparently activated on Heroku so as to not play
30
+ favorites with any particular Redis service. You need to set a config option
31
+ for your app:
32
+ `heroku config:set REDIS_PROVIDER=REDISTOGO_URL`. You may also use
33
+ the generic `REDIS_URL`. See
34
+ [Advanced Options: Setting the Location of your Redis server][1]
35
+ for details.
36
+ * Anyone using Airbrake, Honeybadger, Exceptional or ExceptionNotifier
37
+ will need to update their error gem version to the latest to pull in
38
+ Sidekiq support. Sidekiq will not provide explicit support for these
39
+ services so as to not play favorites with any particular error service.
40
+ * MRI 1.9 is no longer officially supported. Sidekiq's official
41
+ support policy is to support the current and previous major releases
42
+ of MRI and Rails. As of February 2014, that's MRI 2.1, MRI 2.0, JRuby 1.7, Rails 4.0
43
+ and Rails 3.2. I will consider PRs to fix issues found by users for
44
+ other platforms/versions.
45
+
46
+ ## Error Service Providers
47
+
48
+ If you previously provided a middleware to capture job errors, you
49
+ should instead provide a global error handler with Sidekiq 3.0. This
50
+ ensures **any** error within Sidekiq will be logged appropriately, not
51
+ just during job execution.
52
+
53
+ ```ruby
54
+ if Sidekiq::VERSION < '3'
55
+ # old behavior
56
+ Sidekiq.configure_server do |config|
57
+ config.server_middleware do |chain|
58
+ chain.add MyErrorService::Middleware
59
+ end
60
+ end
61
+ else
62
+ Sidekiq.configure_server do |config|
63
+ config.error_handlers << proc {|ex,context| MyErrorService.notify(ex, context) }
64
+ end
65
+ end
66
+ ```
67
+
68
+ Your error handler must respond to `call(exception, context_hash)`.
69
+
70
+ [1]: https://github.com/mperham/sidekiq/wiki/Advanced-Options#via-env-variable
@@ -0,0 +1,53 @@
1
+ # Welcome to Sidekiq 4.0!
2
+
3
+ Sidekiq 4.0 contains a redesigned, more efficient core with less overhead per job.
4
+ See my blog for [an overview of Sidekiq 4's higher performance](http://www.mikeperham.com/2015/10/14/optimizing-sidekiq/).
5
+
6
+ ## What's New
7
+
8
+ * Sidekiq no longer uses Celluloid. If your application code uses Celluloid,
9
+ you will need to pull it in yourself.
10
+
11
+ * `redis-namespace` has been removed from Sidekiq's gem dependencies. If
12
+ you want to use namespacing ([and I strongly urge you not to](http://www.mikeperham.com/2015/09/24/storing-data-with-redis/)), you'll need to add the gem to your Gemfile:
13
+ ```ruby
14
+ gem 'redis-namespace'
15
+ ```
16
+
17
+ * **Redis 2.8.0 or greater is required.** Redis 2.8 was released two years
18
+ ago and contains **many** useful features which Sidekiq couldn't
19
+ leverage until now. **Redis 3.0.3 or greater is recommended** for large
20
+ scale use [#2431](https://github.com/mperham/sidekiq/issues/2431).
21
+
22
+ * Jobs are now fetched from Redis in parallel, making Sidekiq more
23
+ resilient to high network latency. This means that Sidekiq requires
24
+ more Redis connections per process. You must have a minimum of
25
+ `concurrency + 2` connections in your pool or Sidekiq will exit.
26
+ When in doubt, let Sidekiq size the connection pool for you.
27
+
28
+ * Worker data is no longer updated in real-time but rather upon every
29
+ heartbeat. Don't expect the `Sidekiq::Workers` API to be millisecond-precise.
30
+
31
+ * There's a new testing API based off the `Sidekiq::Queues` namespace. All
32
+ assertions made against the Worker class still work as expected.
33
+ ```ruby
34
+ assert_equal 0, Sidekiq::Queues["default"].size
35
+ HardWorker.perform_async("log")
36
+ assert_equal 1, Sidekiq::Queues["default"].size
37
+ assert_equal "log", Sidekiq::Queues["default"].first['args'][0]
38
+ Sidekiq::Queues.clear_all
39
+ ```
40
+
41
+ ## Upgrade
42
+
43
+ First, make sure you are using Redis 2.8 or greater. Next:
44
+
45
+ * Upgrade to the latest Sidekiq 3.x.
46
+ ```ruby
47
+ gem 'sidekiq', '< 4'
48
+ ```
49
+ * Fix any deprecation warnings you see.
50
+ * Upgrade to 4.x.
51
+ ```ruby
52
+ gem 'sidekiq', '< 5'
53
+ ```
@@ -0,0 +1,56 @@
1
+ # Welcome to Sidekiq 5.0!
2
+
3
+ Sidekiq 5.0 contains a reworked job dispatch and execution core to integrate
4
+ better with the new Rails 5.0 Executor. It also drops support for older
5
+ versions of Ruby and Rails and adds support for RTL languages in the Web UI.
6
+
7
+ ## What's New
8
+
9
+ * Integrate job logging and retry logic directly in with the job
10
+ execution logic in Sidekiq::Processor. Previously this logic was
11
+ defined as middleware. In Rails 5.0, ActiveSupport::Executor handles ActiveRecord
12
+ connection management, job callbacks, development mode class loading,
13
+ etc. Because of its extensive responsibilities, the Executor can't be
14
+ integrated as Sidekiq middleware; the logging/retry logic had to be pulled out
15
+ too. Sidekiq 4.2 had a hack to make it work but this redesign provides
16
+ a cleaner integration. [#3235]
17
+ * The Delayed Extensions `delay`, `delay_in` and `delay_until` APIs are
18
+ no longer available by default. The extensions allow you to marshal
19
+ job arguments as YAML, leading to cases where job payloads could be many
20
+ 100s of KB or larger if not careful, leading to Redis networking
21
+ timeouts or other problems. As noted in the Best Practices wiki page,
22
+ Sidekiq is designed for jobs with small, simple arguments.
23
+
24
+ Add this line to your initializer to re-enable them and get the old behavior:
25
+ ```ruby
26
+ Sidekiq::Extensions.enable_delay!
27
+ ```
28
+ The old `Sidekiq.remove_delay!` API has been removed as it is now the default. [#3299]
29
+ * Sidekiq's quiet signal is now `TSTP` (think of it as **T**hread
30
+ **ST**o**P**) instead of USR1 as USR1 is not available on JRuby.
31
+ USR1 will continue to be supported in Sidekiq 5.x for backwards
32
+ compatibility and will be removed in Sidekiq 6.x. [#3302]
33
+ * The Web UI is now bi-directional - it can render either LTR
34
+ (left-to-right) or RTL languages. With this change, **Farsi, Arabic,
35
+ Hebrew and Urdu** are officially supported. [#3381]
36
+ * Jobs which can't be parsed due to invalid JSON are now pushed
37
+ immediately to the Dead set since they require manual intervention and
38
+ will never execute successfully as is. The Web UI has been updated to
39
+ more gracefully display these jobs. [#3296]
40
+ * **Rails 3.2** is no longer supported.
41
+ * **Ruby 2.0 and Ruby 2.1** are no longer supported. Ruby 2.2.2+ is required.
42
+
43
+ ## Upgrade
44
+
45
+ As always, please upgrade Sidekiq **one major version at a time**.
46
+ If you are already running Sidekiq 4.x, then:
47
+
48
+ * Upgrade to the latest Sidekiq 4.x.
49
+ ```ruby
50
+ gem 'sidekiq', '< 5'
51
+ ```
52
+ * Fix any deprecation warnings you see.
53
+ * Upgrade to 5.x.
54
+ ```ruby
55
+ gem 'sidekiq', '< 6'
56
+ ```
@@ -0,0 +1,95 @@
1
+ END-USER LICENSE AGREEMENT
2
+
3
+ ------------------------------------------------------------------------------
4
+
5
+ IMPORTANT: THIS SOFTWARE END-USER LICENSE AGREEMENT ("EULA") IS A LEGAL AGREEMENT (“Agreement”) BETWEEN YOU (THE CUSTOMER, EITHER AS AN INDIVIDUAL OR, IF PURCHASED OR OTHERWISE ACQUIRED BY OR FOR AN ENTITY, AS AN ENTITY) AND CONTRIBUTED SYSTEMS. READ IT CAREFULLY BEFORE COMPLETING THE INSTALLATION PROCESS AND USING SIDEKIQ PRO AND RELATED SOFTWARE COMPONENTS (“SOFTWARE”). IT PROVIDES A LICENSE TO USE THE SOFTWARE AND CONTAINS WARRANTY INFORMATION AND LIABILITY DISCLAIMERS. BY INSTALLING AND USING THE SOFTWARE, YOU ARE CONFIRMING YOUR ACCEPTANCE OF THE SOFTWARE AND AGREEING TO BECOME BOUND BY THE TERMS OF THIS AGREEMENT.
6
+
7
+ ------------------------------------------------------------------------------
8
+
9
+ In order to use the Software under this Agreement, you must receive a “Source URL” at the time of purchase, in accordance with the scope of use and other terms specified for each type of Software and as set forth in this Section 1 of this Agreement.
10
+
11
+ 1. License Grant
12
+
13
+ 1.1 General Use. This Agreement grants you a non-exclusive, non-transferable, limited license to the use rights for the Software, without the right to grant sublicenses, subject to the terms and conditions in this Agreement. The Software is licensed, not sold.
14
+
15
+ 1.2 Unlimited Organization License. If you purchased an Organization License (included with the Sidekiq Pro Software), you may install the Software on an unlimited number of Hosts. “Host” means any physical or virtual machine which is controlled by you. You may also run an unlimited number of Workers. “Worker” means a thread within a Sidekiq server process which executes jobs. You may concurrently run the software on an unlimited number of Hosts, with each host running an unlimited number of Workers.
16
+
17
+ 1.3 Limited Organization License. If you purchased an Organization License (included with the Sidekiq Enterprise Software), you may install the Software on an unlimited number of Hosts. “Host” means any physical or virtual machine which is controlled by you. The aggregate number of Workers run by the hosts must not exceed the maximum number of Workers authorized at the time of purchase. “Worker” means a thread within a Sidekiq server process which executes jobs. In order to run additional Workers, you must purchase an additional allowance from Contributed Systems.
18
+
19
+ 1.4 Appliance License. If you purchased an Appliance License, you may distribute the Software in any applications, frameworks, or elements (collectively referred to as an “Application” or “Applications”) that you develop using the Software in accordance with this EULA, provided that such distribution does not violate the restrictions set forth in section 3 of this EULA. You must not remove, obscure or interfere with any copyright, acknowledgment, attribution, trademark, warning or disclaimer statement affixed to, incorporated in or otherwise applied in connection with the Software. You are required to ensure that the Software is not reused by or with any applications other than those with which you distribute it as permitted herein. For example, if You install the Software on a customer’s server, that customer is not permitted to use the Software independently of your Application. You must inform Contributed Systems of your knowledge of any infringing use of the Software by any of your customers. You are liable for compliance by those third parties with the terms and conditions of this EULA. You will not owe Contributed Systems any royalties for your distribution of the Software in accordance with this EULA.
20
+
21
+ 1.5 Archive Copies. You are entitled to make a reasonable amount of copies of the Software for archival purposes. Each copy must reproduce all copyright and other proprietary rights notices on or in the Software Product.
22
+
23
+ 1.6 Electronic Delivery. All Software and license documentation shall be delivered by electronic means unless otherwise specified on the applicable invoice or at the time of purchase. Software shall be deemed delivered when it is made available for download by you (“Delivery”).
24
+
25
+ 2. Modifications. Contributed Systems shall provide you with source code so that you can create Modifications of the original software. “Modification” means: (a) any addition to or deletion from the contents of a file included in the original Software or previous Modifications created by You, or (b) any new file that contains any part of the original Software or previous Modifications. While you retain all rights to any original work authored by you as part of the Modifications, We continue to own all copyright and other intellectual property rights in the Software.
26
+
27
+ 3. Restricted Uses.
28
+
29
+ 3.1 You shall not (and shall not allow any third party to): (a) decompile, disassemble, or otherwise reverse engineer the Software or attempt to reconstruct or discover any source code, underlying ideas, algorithms, file formats or programming interfaces of the Software by any means whatsoever (except and only to the extent that applicable law prohibits or restricts reverse engineering restrictions); (b) distribute, sell, sublicense, rent, lease or use the Software for time sharing, hosting, service provider or like purposes, except as expressly permitted under this Agreement; (c) redistribute the Software or Modifications other than by including the Software or a portion thereof within your own product, which must have substantially different functionality than the Software or Modifications and must not allow any third party to use the Software or Modifications, or any portions thereof, for software development or application development purposes; (d) redistribute the Software as part of a product, "appliance" or "virtual server"; (e) redistribute the Software on any server which is not directly under your control; (f) remove any product identification, proprietary, copyright or other notices contained in the Software; (g) modify any part of the Software, create a derivative work of any part of the Software (except as permitted in Section 4), or incorporate the Software, except to the extent expressly authorized in writing by Contributed Systems; (h) publicly disseminate performance information or analysis (including, without limitation, benchmarks) from any source relating to the Software; (i) utilize any equipment, device, software, or other means designed to circumvent or remove any form of Source URL or copy protection used by Contributed Systems in connection with the Software, or use the Software together with any authorization code, Source URL, serial number, or other copy protection device not supplied by Contributed Systems; (j) use the Software to develop a product which is competitive with any Contributed Systems product offerings; or (k) use unauthorized Source URLS or keycode(s) or distribute or publish Source URLs or keycode(s), except as may be expressly permitted by Contributed Systems in writing. If your unique Source URL is ever published, Contributed Systems reserves the right to terminate your access without notice.
30
+
31
+ 3.2 UNDER NO CIRCUMSTANCES MAY YOU USE THE SOFTWARE AS PART OF A PRODUCT OR SERVICE THAT PROVIDES SIMILAR FUNCTIONALITY TO THE SOFTWARE ITSELF.
32
+
33
+ The Open Source version of the Software (“LGPL Version”) is licensed
34
+ under the terms of the GNU Lesser General Public License versions 3.0
35
+ (“LGPL”) and not under this EULA.
36
+
37
+ 4. Ownership. Notwithstanding anything to the contrary contained herein, except for the limited license rights expressly provided herein, Contributed Systems and its suppliers have and will retain all rights, title and interest (including, without limitation, all patent, copyright, trademark, trade secret and other intellectual property rights) in and to the Software and all copies, modifications and derivative works thereof (including any changes which incorporate any of your ideas, feedback or suggestions). You acknowledge that you are obtaining only a limited license right to the Software, and that irrespective of any use of the words “purchase”, “sale” or like terms hereunder no ownership rights are being conveyed to you under this Agreement or otherwise.
38
+
39
+ 5. Fees and Payment. The Software license fees will be due and payable in full as set forth in the applicable invoice or at the time of purchase. If the Software does not function properly within two weeks of purchase, please contact us within those two weeks for a refund. You shall be responsible for all taxes, withholdings, duties and levies arising from the order (excluding taxes based on the net income of Contributed Systems).
40
+
41
+ 6. Support, Maintenance and Services. Subject to the terms and conditions of this Agreement, as set forth in your invoice, and as set forth on the Sidekiq Pro support page (https://github.com/mperham/sidekiq/wiki/Pro-Support), support and maintenance services may be included with the purchase of your license subscription.
42
+
43
+ 7. Term of Agreement.
44
+
45
+ 7.1 Term. This Agreement is effective as of the Delivery of the Software and expires at such time as all license and service subscriptions hereunder have expired in accordance with their own terms (the “Term”). For clarification, the term of your license under this Agreement may be perpetual, limited for Evaluation Version, or designated as a fixed-term license in the Invoice, and shall be specified at your time of purchase. Either party may terminate this Agreement (including all related Invoices) if the other party: (a) fails to cure any material breach of this Agreement within thirty (30) days after written notice of such breach, provided that Contributed Systems may terminate this Agreement immediately upon any breach of Section 3 or if you exceed any other restrictions contained in Section 1, unless otherwise specified in this agreement; (b) ceases operation without a successor; or (c) seeks protection under any bankruptcy, receivership, trust deed, creditors arrangement, composition or comparable proceeding, or if any such proceeding is instituted against such party (and not dismissed within sixty (60) days)). Termination is not an exclusive remedy and the exercise by either party of any remedy under this Agreement will be without prejudice to any other remedies it may have under this Agreement, by law, or otherwise.
46
+
47
+ 7.2 Termination. Upon any termination of this Agreement, you shall cease any and all use of any Software and destroy all copies thereof.
48
+
49
+ 7.3 Expiration of License. Upon the expiration of any term under this Agreement, (a) all Software updates and services pursuant to the license shall cease, (b) you may only continue to run existing installations of the Software, (c) you may not install the Software on any additional Hosts, and (d) any new installation of the Software shall require the purchase of a new license subscription from Contributed Systems.
50
+
51
+ 8. Disclaimer of Warranties. The Software is provided "as is," with all faults, defects and errors, and without warranty of any kind. Contributed Systems does not warrant that the Software will be free of bugs, errors, viruses or other defects, and Contributed Systems shall have no liability of any kind for the use of or inability to use the Software, the Software content or any associated service, and you acknowledge that it is not technically practicable for Contributed Systems to do so.
52
+ To the maximum extent permitted by applicable law, Contributed Systems disclaims all warranties, express, implied, arising by law or otherwise, regarding the Software, the Software content and their respective performance or suitability for your intended use, including without limitation any implied warranty of merchantability, fitness for a particular purpose.
53
+
54
+ 9. Limitation of Liability.
55
+
56
+ In no event will Contributed Systems be liable for any direct, indirect, consequential, incidental, special, exemplary, or punitive damages or liabilities whatsoever arising from or relating to the Software, the Software content or this Agreement, whether based on contract, tort (including negligence), strict liability or other theory, even if Contributed Systems has been advised of the possibility of such damages.
57
+
58
+ In no event will Contributed Systems' liability exceed the Software license price as indicated in the invoice. The existence of more than one claim will not enlarge or extend this limit.
59
+
60
+ 10. Remedies. Your exclusive remedy and Contributed Systems’ entire liability for breach of this Agreement shall be limited, at Contributed Systems’ sole and exclusive discretion, to (a) replacement of any defective software or documentation; or (b) refund of the license fee paid to Contributed Systems, payable in accordance with Contributed Systems' refund policy.
61
+
62
+ 11. Acknowledgements.
63
+
64
+ 11.1 Consent to the Use of Data. You agree that Contributed Systems and its affiliates may collect and use technical information gathered as part of the product support services. Contributed Systems may use this information solely to improve products and services and will not disclose this information in a form that personally identifies you.
65
+
66
+ 11.2 Verification. We or a certified auditor acting on our behalf, may, upon its reasonable request and at its expense, audit you with respect to the use of the Software. Such audit may be conducted by mail, electronic means or through an in-person visit to your place of business. Any such in-person audit shall be conducted during regular business hours at your facilities and shall not unreasonably interfere with your business activities. We shall not remove, copy, or redistribute any electronic material during the course of an audit. If an audit reveals that you are using the Software in a way that is in material violation of the terms of the EULA, then you shall pay our reasonable costs of conducting the audit. In the case of a material violation, you agree to pay Us any amounts owing that are attributable to the unauthorized use. In the alternative, We reserve the right, at our sole option, to terminate the licenses for the Software.
67
+
68
+ 11.3 Government End Users. If the Software and related documentation are supplied to or purchased by or on behalf of the United States Government, then the Software is deemed to be "commercial software" as that term is used in the Federal Acquisition Regulation system. Rights of the United States shall not exceed the minimum rights set forth in FAR 52.227-19 for "restricted computer software". All other terms and conditions of this Agreement apply.
69
+
70
+ 12. Third Party Software. Examples included in Software may provide links to third party libraries or code (collectively “Third Party Software”) to implement various functions. Third Party Software does not comprise part of the Software. In some cases, access to Third Party Software may be included along with the Software delivery as a convenience for demonstration purposes. Such source code and libraries may be included in the “…/examples” source tree delivered with the Software and do not comprise the Software. Licensee acknowledges (1) that some part of Third Party Software may require additional licensing of copyright and patents from the owners of such, and (2) that distribution of any of the Software referencing or including any portion of a Third Party Software may require appropriate licensing from such third parties.
71
+
72
+
73
+ 13. Miscellaneous
74
+
75
+ 13.1 Entire Agreement. This Agreement sets forth our entire agreement with respect to the Software and the subject matter hereof and supersedes all prior and contemporaneous understandings and agreements whether written or oral.
76
+
77
+ 13.2 Amendment. Contributed Systems reserves the right, in its sole discretion, to amend this Agreement from time. Amendments to this Agreement can be located at: https://github.com/mperham/sidekiq/blob/master/COMM-LICENSE.
78
+
79
+ 13.3 Assignment. You may not assign this Agreement or any of its rights under this Agreement without the prior written consent of Contributed Systems and any attempted assignment without such consent shall be void.
80
+
81
+ 13.4 Export Compliance. You agree to comply with all applicable laws and regulations, including laws, regulations, orders or other restrictions on export, re-export or redistribution of software.
82
+
83
+ 13.5 Indemnification. You agree to defend, indemnify, and hold harmless Contributed Systems from and against any lawsuits, claims, losses, damages, fines and expenses (including attorneys' fees and costs) arising out of your use of the Software or breach of this Agreement.
84
+
85
+ 13.6 Governing Law. This Agreement is governed by the laws of the State of Oregon and the United States without regard to conflicts of laws provisions thereof, and without regard to the United Nations Convention on the International Sale of Goods or the Uniform Computer Information Transactions Act, as currently enacted by any jurisdiction or as may be codified or amended from time to time by any jurisdiction. The jurisdiction and venue for actions related to the subject matter hereof shall be the state of Oregon and United States federal courts located in Portland, Oregon, and both parties hereby submit to the personal jurisdiction of such courts.
86
+
87
+ 13.7 Attorneys’ Fees and Costs. The prevailing party in any action to enforce this Agreement will be entitled to recover its attorneys’ fees and costs in connection with such action.
88
+
89
+ 13.8 Severability. If any provision of this Agreement is held by a court of competent jurisdiction to be invalid, illegal, or unenforceable, the remainder of this Agreement will remain in full force and effect.
90
+
91
+ 13.9 Waiver. Failure or neglect by either party to enforce at any time any of the provisions of this licence Agreement shall not be construed or deemed to be a waiver of that party's rights under this Agreement.
92
+
93
+ 13.10 Headings. The headings of sections and paragraphs of this Agreement are for convenience of reference only and are not intended to restrict, affect or be of any weight in the interpretation or construction of the provisions of such sections or paragraphs.
94
+
95
+ 14. Contact Information. If you have any questions about this EULA, or if you want to contact Contributed Systems for any reason, please direct correspondence to info@contribsys.com.
@@ -0,0 +1,1402 @@
1
+ # Sidekiq Changes
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
+ 5.0.0
6
+ -----------
7
+
8
+ - **BREAKING CHANGE** Job dispatch was refactored for safer integration with
9
+ Rails 5. The **Logging** and **RetryJobs** server middleware were removed and
10
+ functionality integrated directly into Sidekiq::Processor. These aren't
11
+ commonly used public APIs so this shouldn't impact most users.
12
+ ```
13
+ Sidekiq::Middleware::Server::RetryJobs -> Sidekiq::JobRetry
14
+ Sidekiq::Middleware::Server::Logging -> Sidekiq::JobLogging
15
+ ```
16
+ - Quieting Sidekiq is now done via the TSTP signal, the USR1 signal is deprecated.
17
+ - The `delay` extension APIs are no longer available by default, you
18
+ must opt into them.
19
+ - The Web UI is now BiDi and can render RTL languages like Arabic, Farsi and Hebrew.
20
+ - Rails 3.2 and Ruby 2.0 and 2.1 are no longer supported.
21
+ - The `SomeWorker.set(options)` API was re-written to avoid thread-local state. [#2152]
22
+ - Sidekiq Enterprise's encrypted jobs now display "[encrypted data]" in the Web UI instead
23
+ of random hex bytes.
24
+ - Please see the [5.0 Upgrade notes](5.0-Upgrade.md) for more detail.
25
+
26
+ 4.2.10
27
+ -----------
28
+
29
+ - Scheduled jobs can now be moved directly to the Dead queue via API [#3390]
30
+ - Fix edge case leading to job duplication when using Sidekiq Pro's
31
+ reliability feature [#3388]
32
+ - Fix error class name display on retry page [#3348]
33
+ - More robust latency calculation [#3340]
34
+
35
+ 4.2.9
36
+ -----------
37
+
38
+ - Rollback [#3303] which broke Heroku Redis users [#3311]
39
+ - Add support for TSTP signal, for Sidekiq 5.0 forward compatibility. [#3302]
40
+
41
+ 4.2.8
42
+ -----------
43
+
44
+ - Fix rare edge case with Redis driver that can create duplicate jobs [#3303]
45
+ - Fix Rails 5 loading issue [#3275]
46
+ - Restore missing tooltips to timestamps in Web UI [#3310]
47
+ - Work on **Sidekiq 5.0** is now active! [#3301]
48
+
49
+ 4.2.7
50
+ -----------
51
+
52
+ - Add new integration testing to verify code loading and job execution
53
+ in development and production modes with Rails 4 and 5 [#3241]
54
+ - Fix delayed extensions in development mode [#3227, DarthSim]
55
+ - Use Worker's `retry` default if job payload does not have a retry
56
+ attribute [#3234, mlarraz]
57
+
58
+ 4.2.6
59
+ -----------
60
+
61
+ - Run Rails Executor when in production [#3221, eugeneius]
62
+
63
+ 4.2.5
64
+ -----------
65
+
66
+ - Re-enable eager loading of all code when running non-development Rails 5. [#3203]
67
+ - Better root URL handling for zany web servers [#3207]
68
+
69
+ 4.2.4
70
+ -----------
71
+
72
+ - Log errors coming from the Rails 5 reloader. [#3212, eugeneius]
73
+ - Clone job data so middleware changes don't appear in Busy tab
74
+
75
+ 4.2.3
76
+ -----------
77
+
78
+ - Disable use of Rails 5's Reloader API in non-development modes, it has proven
79
+ to be unstable under load [#3154]
80
+ - Allow disabling of Sidekiq::Web's cookie session to handle the
81
+ case where the app provides a session already [#3180, inkstak]
82
+ ```ruby
83
+ Sidekiq::Web.set :sessions, false
84
+ ```
85
+ - Fix Web UI sharding support broken in 4.2.2. [#3169]
86
+ - Fix timestamps not updating during UI polling [#3193, shaneog]
87
+ - Relax rack-protection version to >= 1.5.0
88
+ - Provide consistent interface to exception handlers, changing the structure of the context hash. [#3161]
89
+
90
+ 4.2.2
91
+ -----------
92
+
93
+ - Fix ever-increasing cookie size with nginx [#3146, cconstantine]
94
+ - Fix so Web UI works without trailing slash [#3158, timdorr]
95
+
96
+ 4.2.1
97
+ -----------
98
+
99
+ - Ensure browser does not cache JSON/AJAX responses. [#3136]
100
+ - Support old Sinatra syntax for setting config [#3139]
101
+
102
+ 4.2.0
103
+ -----------
104
+
105
+ - Enable development-mode code reloading. **With Rails 5.0+, you don't need
106
+ to restart Sidekiq to pick up your Sidekiq::Worker changes anymore!** [#2457]
107
+ - **Remove Sinatra dependency**. Sidekiq's Web UI now uses Rack directly.
108
+ Thank you to Sidekiq's newest committer, **badosu**, for writing the code
109
+ and doing a lot of testing to ensure compatibility with many different
110
+ 3rd party plugins. If your Web UI works with 4.1.4 but fails with
111
+ 4.2.0, please open an issue. [#3075]
112
+ - Allow tuning of concurrency with the `RAILS_MAX_THREADS` env var. [#2985]
113
+ This is the same var used by Puma so you can tune all of your systems
114
+ the same way:
115
+ ```sh
116
+ web: RAILS_MAX_THREADS=5 bundle exec puma ...
117
+ worker: RAILS_MAX_THREADS=10 bundle exec sidekiq ...
118
+ ```
119
+ Using `-c` or `config/sidekiq.yml` overrides this setting. I recommend
120
+ adjusting your `config/database.yml` to use it too so connections are
121
+ auto-scaled:
122
+ ```yaml
123
+ pool: <%= ENV['RAILS_MAX_THREADS'] || 5 %>
124
+ ```
125
+
126
+ 4.1.4
127
+ -----------
128
+
129
+ - Unlock Sinatra so a Rails 5.0 compatible version may be used [#3048]
130
+ - Fix race condition on startup with JRuby [#3043]
131
+
132
+
133
+ 4.1.3
134
+ -----------
135
+
136
+ - Please note the Redis 3.3.0 gem has a [memory leak](https://github.com/redis/redis-rb/issues/612),
137
+ Redis 3.2.2 is recommended until that issue is fixed.
138
+ - Sinatra 1.4.x is now a required dependency, avoiding cryptic errors
139
+ and old bugs due to people not upgrading Sinatra for years. [#3042]
140
+ - Fixed race condition in heartbeat which could rarely lead to lingering
141
+ processes on the Busy tab. [#2982]
142
+ ```ruby
143
+ # To clean up lingering processes, modify this as necessary to connect to your Redis.
144
+ # After 60 seconds, lingering processes should disappear from the Busy page.
145
+
146
+ require 'redis'
147
+ r = Redis.new(url: "redis://localhost:6379/0")
148
+ # uncomment if you need a namespace
149
+ #require 'redis-namespace'
150
+ #r = Redis::Namespace.new("foo", r)
151
+ r.smembers("processes").each do |pro|
152
+ r.expire(pro, 60)
153
+ r.expire("#{pro}:workers", 60)
154
+ end
155
+ ```
156
+
157
+
158
+ 4.1.2
159
+ -----------
160
+
161
+ - Fix Redis data leak with worker data when a busy Sidekiq process
162
+ crashes. You can find and expire leaked data in Redis with this
163
+ script:
164
+ ```bash
165
+ $ redis-cli keys "*:workers" | while read LINE ; do TTL=`redis-cli expire "$LINE" 60`; echo "$LINE"; done;
166
+ ```
167
+ Please note that `keys` can be dangerous to run on a large, busy Redis. Caveat runner.
168
+ - Freeze all string literals with Ruby 2.3. [#2741]
169
+ - Client middleware can now stop bulk job push. [#2887]
170
+
171
+ 4.1.1
172
+ -----------
173
+
174
+ - Much better behavior when Redis disappears and comes back. [#2866]
175
+ - Update FR locale [dbachet]
176
+ - Don't fill logfile in case of Redis downtime [#2860]
177
+ - Allow definition of a global retries_exhausted handler. [#2807]
178
+ ```ruby
179
+ Sidekiq.configure_server do |config|
180
+ config.default_retries_exhausted = -> (job, ex) do
181
+ Sidekiq.logger.info "#{job['class']} job is now dead"
182
+ end
183
+ end
184
+ ```
185
+
186
+ 4.1.0
187
+ -----------
188
+
189
+ - Tag quiet processes in the Web UI [#2757, jcarlson]
190
+ - Pass last exception to sidekiq\_retries\_exhausted block [#2787, Nowaker]
191
+ ```ruby
192
+ class MyWorker
193
+ include Sidekiq::Worker
194
+ sidekiq_retries_exhausted do |job, exception|
195
+ end
196
+ end
197
+ ```
198
+ - Add native support for ActiveJob's `set(options)` method allowing
199
+ you to override worker options dynamically. This should make it
200
+ even easier to switch between ActiveJob and Sidekiq's native APIs [#2780]
201
+ ```ruby
202
+ class MyWorker
203
+ include Sidekiq::Worker
204
+ sidekiq_options queue: 'default', retry: true
205
+
206
+ def perform(*args)
207
+ # do something
208
+ end
209
+ end
210
+
211
+ MyWorker.set(queue: 'high', retry: false).perform_async(1)
212
+ ```
213
+
214
+ 4.0.2
215
+ -----------
216
+
217
+ - Better Japanese translations
218
+ - Remove `json` gem dependency from gemspec. [#2743]
219
+ - There's a new testing API based off the `Sidekiq::Queues` namespace. All
220
+ assertions made against the Worker class still work as expected.
221
+ [#2676, brandonhilkert]
222
+ ```ruby
223
+ assert_equal 0, Sidekiq::Queues["default"].size
224
+ HardWorker.perform_async("log")
225
+ assert_equal 1, Sidekiq::Queues["default"].size
226
+ assert_equal "log", Sidekiq::Queues["default"].first['args'][0]
227
+ Sidekiq::Queues.clear_all
228
+ ```
229
+
230
+ 4.0.1
231
+ -----------
232
+
233
+ - Yank new queue-based testing API [#2663]
234
+ - Fix invalid constant reference in heartbeat
235
+
236
+ 4.0.0
237
+ -----------
238
+
239
+ - Sidekiq's internals have been completely overhauled for performance
240
+ and to remove dependencies. This has resulted in major speedups, as
241
+ [detailed on my blog](http://www.mikeperham.com/2015/10/14/optimizing-sidekiq/).
242
+ - See the [4.0 upgrade notes](4.0-Upgrade.md) for more detail.
243
+
244
+ 3.5.4
245
+ -----------
246
+
247
+ - Ensure exception message is a string [#2707]
248
+ - Revert racy Process.kill usage in sidekiqctl
249
+
250
+ 3.5.3
251
+ -----------
252
+
253
+ - Adjust shutdown event to run in parallel with the rest of system shutdown. [#2635]
254
+
255
+ 3.5.2
256
+ -----------
257
+
258
+ - **Sidekiq 3 is now in maintenance mode**, only major bugs will be fixed.
259
+ - The exception triggering a retry is now passed into `sidekiq_retry_in`,
260
+ allowing you to retry more frequently for certain types of errors.
261
+ [#2619, kreynolds]
262
+ ```ruby
263
+ sidekiq_retry_in do |count, ex|
264
+ case ex
265
+ when RuntimeError
266
+ 5 * count
267
+ else
268
+ 10 * count
269
+ end
270
+ end
271
+ ```
272
+
273
+ 3.5.1
274
+ -----------
275
+
276
+ - **FIX MEMORY LEAK** Under rare conditions, threads may leak [#2598, gazay]
277
+ - Add Ukrainian locale [#2561, elrakita]
278
+ - Disconnect and retry Redis operations if we see a READONLY error [#2550]
279
+ - Add server middleware testing harness; see [wiki](https://github.com/mperham/sidekiq/wiki/Testing#testing-server-middleware) [#2534, ryansch]
280
+
281
+ 3.5.0
282
+ -----------
283
+
284
+ - Polished new banner! [#2522, firedev]
285
+ - Upgrade to Celluloid 0.17. [#2420, digitalextremist]
286
+ - Activate sessions in Sinatra for CSRF protection, requires Rails
287
+ monkeypatch due to rails/rails#15843. [#2460, jc00ke]
288
+
289
+ 3.4.2
290
+ -----------
291
+
292
+ - Don't allow `Sidekiq::Worker` in ActiveJob::Base classes. [#2424]
293
+ - Safer display of job data in Web UI [#2405]
294
+ - Fix CSRF vulnerability in Web UI, thanks to Egor Homakov for
295
+ reporting. [#2422] If you are running the Web UI as a standalone Rack app,
296
+ ensure you have a [session middleware
297
+ configured](https://github.com/mperham/sidekiq/wiki/Monitoring#standalone):
298
+ ```ruby
299
+ use Rack::Session::Cookie, :secret => "some unique secret string here"
300
+ ```
301
+
302
+ 3.4.1
303
+ -----------
304
+
305
+ - Lock to Celluloid 0.16
306
+
307
+
308
+ 3.4.0
309
+ -----------
310
+
311
+ - Set a `created_at` attribute when jobs are created, set `enqueued_at` only
312
+ when they go into a queue. Fixes invalid latency calculations with scheduled jobs.
313
+ [#2373, mrsimo]
314
+ - Don't log timestamp on Heroku [#2343]
315
+ - Run `shutdown` event handlers in reverse order of definition [#2374]
316
+ - Rename and rework `poll_interval` to be simpler, more predictable [#2317, cainlevy]
317
+ The new setting is `average_scheduled_poll_interval`. To configure
318
+ Sidekiq to look for scheduled jobs every 5 seconds, just set it to 5.
319
+ ```ruby
320
+ Sidekiq.configure_server do |config|
321
+ config.average_scheduled_poll_interval = 5
322
+ end
323
+ ```
324
+
325
+ 3.3.4
326
+ -----------
327
+
328
+ - **Improved ActiveJob integration** - Web UI now shows ActiveJobs in a
329
+ nicer format and job logging shows the actual class name, requires
330
+ Rails 4.2.2+ [#2248, #2259]
331
+ - Add Sidekiq::Process#dump\_threads API to trigger TTIN output [#2247]
332
+ - Web UI polling now uses Ajax to avoid page reload [#2266, davydovanton]
333
+ - Several Web UI styling improvements [davydovanton]
334
+ - Add Tamil, Hindi translations for Web UI [ferdinandrosario, tejasbubane]
335
+ - Fix Web UI to work with country-specific locales [#2243]
336
+ - Handle circular error causes [#2285, eugenk]
337
+
338
+ 3.3.3
339
+ -----------
340
+
341
+ - Fix crash on exit when Redis is down [#2235]
342
+ - Fix duplicate logging on startup
343
+ - Undeprecate delay extension for ActionMailer 4.2+ . [#2186]
344
+
345
+ 3.3.2
346
+ -----------
347
+
348
+ - Add Sidekiq::Stats#queues back
349
+ - Allows configuration of dead job set size and timeout [#2173, jonhyman]
350
+ - Refactor scheduler enqueuing so Sidekiq Pro can override it. [#2159]
351
+
352
+ 3.3.1
353
+ -----------
354
+
355
+ - Dumb down ActionMailer integration so it tries to deliver if possible [#2149]
356
+ - Stringify Sidekiq.default\_worker\_options's keys [#2126]
357
+ - Add random integer to process identity [#2113, michaeldiscala]
358
+ - Log Sidekiq Pro's Batch ID if available [#2076]
359
+ - Refactor Processor Redis usage to avoid redis/redis-rb#490 [#2094]
360
+ - Move /dashboard/stats to /stats. Add /stats/queues. [moserke, #2099]
361
+ - Add processes count to /stats [ismaelga, #2141]
362
+ - Greatly improve speed of Sidekiq::Stats [ismaelga, #2142]
363
+ - Add better usage text for `sidekiqctl`.
364
+ - `Sidekiq::Logging.with_context` is now a stack so you can set your
365
+ own job context for logging purposes [grosser, #2110]
366
+ - Remove usage of Google Fonts in Web UI so it loads in China [#2144]
367
+
368
+ 3.3.0
369
+ -----------
370
+
371
+ - Upgrade to Celluloid 0.16 [#2056]
372
+ - Fix typo for generator test file name [dlackty, #2016]
373
+ - Add Sidekiq::Middleware::Chain#prepend [seuros, #2029]
374
+
375
+ 3.2.6
376
+ -----------
377
+
378
+ - Deprecate delay extension for ActionMailer 4.2+ . [seuros, #1933]
379
+ - Poll interval tuning now accounts for dead processes [epchris, #1984]
380
+ - Add non-production environment to Web UI page titles [JacobEvelyn, #2004]
381
+
382
+ 3.2.5
383
+ -----------
384
+
385
+ - Lock Celluloid to 0.15.2 due to bugs in 0.16.0. This prevents the
386
+ "hang on shutdown" problem with Celluloid 0.16.0.
387
+
388
+ 3.2.4
389
+ -----------
390
+
391
+ - Fix issue preventing ActionMailer sends working in some cases with
392
+ Rails 4. [pbhogan, #1923]
393
+
394
+ 3.2.3
395
+ -----------
396
+
397
+ - Clean invalid bytes from error message before converting to JSON (requires Ruby 2.1+) [#1705]
398
+ - Add queues list for each process to the Busy page. [davetoxa, #1897]
399
+ - Fix for crash caused by empty config file. [jordan0day, #1901]
400
+ - Add Rails Worker generator, `rails g sidekiq:worker User` will create `app/workers/user_worker.rb`. [seuros, #1909]
401
+ - Fix Web UI rendering with huge job arguments [jhass, #1918]
402
+ - Minor refactoring of Sidekiq::Client internals, for Sidekiq Pro. [#1919]
403
+
404
+ 3.2.2
405
+ -----------
406
+
407
+ - **This version of Sidekiq will no longer start on Ruby 1.9.** Sidekiq
408
+ 3 does not support MRI 1.9 but we've allowed it to run before now.
409
+ - Fix issue which could cause Sidekiq workers to disappear from the Busy
410
+ tab while still being active [#1884]
411
+ - Add "Back to App" button in Web UI. You can set the button link via
412
+ `Sidekiq::Web.app_url = 'http://www.mysite.com'` [#1875, seuros]
413
+ - Add process tag (`-g tag`) to the Busy page so you can differentiate processes at a glance. [seuros, #1878]
414
+ - Add "Kill" button to move retries directly to the DJQ so they don't retry. [seuros, #1867]
415
+
416
+ 3.2.1
417
+ -----------
418
+
419
+ - Revert eager loading change for Rails 3.x apps, as it broke a few edge
420
+ cases.
421
+
422
+ 3.2.0
423
+ -----------
424
+
425
+ - **Fix issue which caused duplicate job execution in Rails 3.x**
426
+ 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
427
+ error, making Sidekiq think the job needs to be retried. **The fix requires Ruby 2.1**. [#1805]
428
+ - Update how Sidekiq eager loads Rails application code [#1791, jonleighton]
429
+ - Change logging timestamp to show milliseconds.
430
+ - Reverse sorting of Dead tab so newer jobs are listed first [#1802]
431
+
432
+ 3.1.4
433
+ -----------
434
+
435
+ - Happy π release!
436
+ - Self-tuning Scheduler polling, we use heartbeat info to better tune poll\_interval [#1630]
437
+ - Remove all table column width rules, hopefully get better column formatting [#1747]
438
+ - Handle edge case where YAML can't be decoded in dev mode [#1761]
439
+ - Fix lingering jobs in Busy page on Heroku [#1764]
440
+
441
+ 3.1.3
442
+ -----------
443
+
444
+ - Use ENV['DYNO'] on Heroku for hostname display, rather than an ugly UUID. [#1742]
445
+ - Show per-process labels on the Busy page, for feature tagging [#1673]
446
+
447
+
448
+ 3.1.2
449
+ -----------
450
+
451
+ - Suitably chastised, @mperham reverts the Bundler change.
452
+
453
+
454
+ 3.1.1
455
+ -----------
456
+
457
+ - Sidekiq::CLI now runs `Bundler.require(:default, environment)` to boot all gems
458
+ before loading any app code.
459
+ - Sort queues by name in Web UI [#1734]
460
+
461
+
462
+ 3.1.0
463
+ -----------
464
+
465
+ - New **remote control** feature: you can remotely trigger Sidekiq to quiet
466
+ or terminate via API, without signals. This is most useful on JRuby
467
+ or Heroku which does not support the USR1 'quiet' signal. Now you can
468
+ run a rake task like this at the start of your deploy to quiet your
469
+ set of Sidekiq processes. [#1703]
470
+ ```ruby
471
+ namespace :sidekiq do
472
+ task :quiet => :environment do
473
+ Sidekiq::ProcessSet.new.each(&:quiet!)
474
+ end
475
+ end
476
+ ```
477
+ - The Web UI can use the API to quiet or stop all processes via the Busy page.
478
+ - The Web UI understands and hides the `Sidekiq::Extensions::Delay*`
479
+ classes, instead showing `Class.method` as the Job. [#1718]
480
+ - Polish the Dashboard graphs a bit, update Rickshaw [brandonhilkert, #1725]
481
+ - The poll interval is now configurable in the Web UI [madebydna, #1713]
482
+ - Delay extensions can be removed so they don't conflict with
483
+ DelayedJob: put `Sidekiq.remove_delay!` in your initializer. [devaroop, #1674]
484
+
485
+
486
+ 3.0.2
487
+ -----------
488
+
489
+ - Revert gemfile requirement of Ruby 2.0. JRuby 1.7 calls itself Ruby
490
+ 1.9.3 and broke with this requirement.
491
+
492
+ 3.0.1
493
+ -----------
494
+
495
+ - Revert pidfile behavior from 2.17.5: Sidekiq will no longer remove its own pidfile
496
+ as this is a race condition when restarting. [#1470, #1677]
497
+ - Show warning on the Queues page if a queue is paused [#1672]
498
+ - Only activate the ActiveRecord middleware if ActiveRecord::Base is defined on boot. [#1666]
499
+ - Add ability to disable jobs going to the DJQ with the `dead` option.
500
+ ```ruby
501
+ sidekiq_options :dead => false, :retry => 5
502
+ ```
503
+ - Minor fixes
504
+
505
+
506
+ 3.0.0
507
+ -----------
508
+
509
+ Please see [3.0-Upgrade.md](3.0-Upgrade.md) for more comprehensive upgrade notes.
510
+
511
+ - **Dead Job Queue** - jobs which run out of retries are now moved to a dead
512
+ job queue. These jobs must be retried manually or they will expire
513
+ after 6 months or 10,000 jobs. The Web UI contains a "Dead" tab
514
+ exposing these jobs. Use `sidekiq_options :retry => false` if you
515
+ don't wish jobs to be retried or put in the DJQ. Use
516
+ `sidekiq_options :retry => 0` if you don't want jobs to retry but go
517
+ straight to the DJQ.
518
+ - **Process Lifecycle Events** - you can now register blocks to run at
519
+ certain points during the Sidekiq process lifecycle: startup, quiet and
520
+ shutdown.
521
+ ```ruby
522
+ Sidekiq.configure_server do |config|
523
+ config.on(:startup) do
524
+ # do something
525
+ end
526
+ end
527
+ ```
528
+ - **Global Error Handlers** - blocks of code which handle errors that
529
+ occur anywhere within Sidekiq, not just within middleware.
530
+ ```ruby
531
+ Sidekiq.configure_server do |config|
532
+ config.error_handlers << proc {|ex,ctx| ... }
533
+ end
534
+ ```
535
+ - **Process Heartbeat** - each Sidekiq process will ping Redis every 5
536
+ seconds to give a summary of the Sidekiq population at work.
537
+ - The Workers tab is now renamed to Busy and contains a list of live
538
+ Sidekiq processes and jobs in progress based on the heartbeat.
539
+ - **Shardable Client** - Sidekiq::Client instances can use a custom
540
+ Redis connection pool, allowing very large Sidekiq installations to scale by
541
+ sharding: sending different jobs to different Redis instances.
542
+ ```ruby
543
+ client = Sidekiq::Client.new(ConnectionPool.new { Redis.new })
544
+ client.push(...)
545
+ ```
546
+ ```ruby
547
+ Sidekiq::Client.via(ConnectionPool.new { Redis.new }) do
548
+ FooWorker.perform_async
549
+ BarWorker.perform_async
550
+ end
551
+ ```
552
+ **Sharding support does require a breaking change to client-side
553
+ middleware, see 3.0-Upgrade.md.**
554
+ - New Chinese, Greek, Swedish and Czech translations for the Web UI.
555
+ - Updated most languages translations for the new UI features.
556
+ - **Remove official Capistrano integration** - this integration has been
557
+ moved into the [capistrano-sidekiq](https://github.com/seuros/capistrano-sidekiq) gem.
558
+ - **Remove official support for MRI 1.9** - Things still might work but
559
+ I no longer actively test on it.
560
+ - **Remove built-in support for Redis-to-Go**.
561
+ Heroku users: `heroku config:set REDIS_PROVIDER=REDISTOGO_URL`
562
+ - **Remove built-in error integration for Airbrake, Honeybadger, ExceptionNotifier and Exceptional**.
563
+ Each error gem should provide its own Sidekiq integration. Update your error gem to the latest
564
+ version to pick up Sidekiq support.
565
+ - Upgrade to connection\_pool 2.0 which now creates connections lazily.
566
+ - Remove deprecated Sidekiq::Client.registered\_\* APIs
567
+ - Remove deprecated support for the old Sidekiq::Worker#retries\_exhausted method.
568
+ - Removed 'sidekiq/yaml\_patch', this was never documented or recommended.
569
+ - Removed --profile option, #1592
570
+ - Remove usage of the term 'Worker' in the UI for clarity. Users would call both threads and
571
+ processes 'workers'. Instead, use "Thread", "Process" or "Job".
572
+
573
+ 2.17.7
574
+ -----------
575
+
576
+ - Auto-prune jobs older than one hour from the Workers page [#1508]
577
+ - Add Sidekiq::Workers#prune which can perform the auto-pruning.
578
+ - Fix issue where a job could be lost when an exception occurs updating
579
+ Redis stats before the job executes [#1511]
580
+
581
+ 2.17.6
582
+ -----------
583
+
584
+ - Fix capistrano integration due to missing pidfile. [#1490]
585
+
586
+ 2.17.5
587
+ -----------
588
+
589
+ - Automatically use the config file found at `config/sidekiq.yml`, if not passed `-C`. [#1481]
590
+ - Store 'retried\_at' and 'failed\_at' timestamps as Floats, not Strings. [#1473]
591
+ - A `USR2` signal will now reopen _all_ logs, using IO#reopen. Thus, instead of creating a new Logger object,
592
+ Sidekiq will now just update the existing Logger's file descriptor [#1163].
593
+ - Remove pidfile when shutting down if started with `-P` [#1470]
594
+
595
+ 2.17.4
596
+ -----------
597
+
598
+ - Fix JID support in inline testing, #1454
599
+ - Polish worker arguments display in UI, #1453
600
+ - Marshal arguments fully to avoid worker mutation, #1452
601
+ - Support reverse paging sorted sets, #1098
602
+
603
+
604
+ 2.17.3
605
+ -----------
606
+
607
+ - Synchronously terminates the poller and fetcher to fix a race condition in bulk requeue during shutdown [#1406]
608
+
609
+ 2.17.2
610
+ -----------
611
+
612
+ - Fix bug where strictly prioritized queues might be processed out of
613
+ order [#1408]. A side effect of this change is that it breaks a queue
614
+ declaration syntax that worked, although only because of a bug—it was
615
+ never intended to work and never supported. If you were declaring your
616
+ queues as a comma-separated list, e.g. `sidekiq -q critical,default,low`,
617
+ you must now use the `-q` flag before each queue, e.g.
618
+ `sidekiq -q critical -q default -q low`.
619
+
620
+ 2.17.1
621
+ -----------
622
+
623
+ - Expose `delay` extension as `sidekiq_delay` also. This allows you to
624
+ run Delayed::Job and Sidekiq in the same process, selectively porting
625
+ `delay` calls to `sidekiq_delay`. You just need to ensure that
626
+ Sidekiq is required **before** Delayed::Job in your Gemfile. [#1393]
627
+ - Bump redis client required version to 3.0.6
628
+ - Minor CSS fixes for Web UI
629
+
630
+ 2.17.0
631
+ -----------
632
+
633
+ - Change `Sidekiq::Client#push_bulk` to return an array of pushed `jid`s. [#1315, barelyknown]
634
+ - Web UI refactoring to use more API internally (yummy dogfood!)
635
+ - Much faster Sidekiq::Job#delete performance for larger queue sizes
636
+ - Further capistrano 3 fixes
637
+ - Many misc minor fixes
638
+
639
+ 2.16.1
640
+ -----------
641
+
642
+ - Revert usage of `resolv-replace`. MRI's native DNS lookup releases the GIL.
643
+ - Fix several Capistrano 3 issues
644
+ - Escaping dynamic data like job args and error messages in Sidekiq Web UI. [#1299, lian]
645
+
646
+ 2.16.0
647
+ -----------
648
+
649
+ - Deprecate `Sidekiq::Client.registered_workers` and `Sidekiq::Client.registered_queues`
650
+ - Refactor Sidekiq::Client to be instance-based [#1279]
651
+ - Pass all Redis options to the Redis driver so Unix sockets
652
+ can be fully configured. [#1270, salimane]
653
+ - Allow sidekiq-web extensions to add locale paths so extensions
654
+ can be localized. [#1261, ondrejbartas]
655
+ - Capistrano 3 support [#1254, phallstrom]
656
+ - Use Ruby's `resolv-replace` to enable pure Ruby DNS lookups.
657
+ This ensures that any DNS resolution that takes place in worker
658
+ threads won't lock up the entire VM on MRI. [#1258]
659
+
660
+ 2.15.2
661
+ -----------
662
+
663
+ - Iterating over Sidekiq::Queue and Sidekiq::SortedSet will now work as
664
+ intended when jobs are deleted [#866, aackerman]
665
+ - A few more minor Web UI fixes [#1247]
666
+
667
+ 2.15.1
668
+ -----------
669
+
670
+ - Fix several Web UI issues with the Bootstrap 3 upgrade.
671
+
672
+ 2.15.0
673
+ -----------
674
+
675
+ - The Core Sidekiq actors are now monitored. If any crash, the
676
+ Sidekiq process logs the error and exits immediately. This is to
677
+ help prevent "stuck" Sidekiq processes which are running but don't
678
+ appear to be doing any work. [#1194]
679
+ - Sidekiq's testing behavior is now dynamic. You can choose between
680
+ `inline` and `fake` behavior in your tests. See
681
+ [Testing](https://github.com/mperham/sidekiq/wiki/Testing) for detail. [#1193]
682
+ - The Retries table has a new column for the error message.
683
+ - The Web UI topbar now contains the status and live poll button.
684
+ - Orphaned worker records are now auto-vacuumed when you visit the
685
+ Workers page in the Web UI.
686
+ - Sidekiq.default\_worker\_options allows you to configure default
687
+ options for all Sidekiq worker types.
688
+
689
+ ```ruby
690
+ Sidekiq.default_worker_options = { 'queue' => 'default', 'backtrace' => true }
691
+ ```
692
+ - Added two Sidekiq::Client class methods for compatibility with resque-scheduler:
693
+ `enqueue_to_in` and `enqueue_in` [#1212]
694
+ - Upgrade Web UI to Bootstrap 3.0. [#1211, jeffboek]
695
+
696
+ 2.14.1
697
+ -----------
698
+
699
+ - Fix misc Web UI issues due to ERB conversion.
700
+ - Bump redis-namespace version due to security issue.
701
+
702
+ 2.14.0
703
+ -----------
704
+
705
+ - Removed slim gem dependency, Web UI now uses ERB [Locke23rus, #1120]
706
+ - Fix more race conditions in Web UI actions
707
+ - Don't reset Job enqueued\_at when retrying
708
+ - Timestamp tooltips in the Web UI should use UTC
709
+ - Fix invalid usage of handle\_exception causing issues in Airbrake
710
+ [#1134]
711
+
712
+
713
+ 2.13.1
714
+ -----------
715
+
716
+ - Make Sidekiq::Middleware::Chain Enumerable
717
+ - Make summary bar and graphs responsive [manishval, #1025]
718
+ - Adds a job status page for scheduled jobs [jonhyman]
719
+ - Handle race condition in retrying and deleting jobs in the Web UI
720
+ - The Web UI relative times are now i18n. [MadRabbit, #1088]
721
+ - Allow for default number of retry attempts to be set for
722
+ `Sidekiq::Middleware::Server::RetryJobs` middleware. [czarneckid] [#1091]
723
+
724
+ ```ruby
725
+ Sidekiq.configure_server do |config|
726
+ config.server_middleware do |chain|
727
+ chain.add Sidekiq::Middleware::Server::RetryJobs, :max_retries => 10
728
+ end
729
+ end
730
+ ```
731
+
732
+
733
+ 2.13.0
734
+ -----------
735
+
736
+ - Adding button to move scheduled job to main queue [guiceolin, #1020]
737
+ - fix i18n support resetting saved locale when job is retried [#1011]
738
+ - log rotation via USR2 now closes the old logger [#1008]
739
+ - Add ability to customize retry schedule, like so [jmazzi, #1027]
740
+
741
+ ```ruby
742
+ class MyWorker
743
+ include Sidekiq::Worker
744
+ sidekiq_retry_in { |count| count * 2 }
745
+ end
746
+ ```
747
+ - Redesign Worker#retries\_exhausted callback to use same form as above [jmazzi, #1030]
748
+
749
+ ```ruby
750
+ class MyWorker
751
+ include Sidekiq::Worker
752
+ sidekiq_retries_exhausted do |msg|
753
+ Rails.logger.error "Failed to process #{msg['class']} with args: #{msg['args']}"
754
+ end
755
+ end
756
+ ```
757
+
758
+ 2.12.4
759
+ -----------
760
+
761
+ - Fix error in previous release which crashed the Manager when a
762
+ Processor died.
763
+
764
+ 2.12.3
765
+ -----------
766
+
767
+ - Revert back to Celluloid's TaskFiber for job processing which has proven to be more
768
+ stable than TaskThread. [#985]
769
+ - Avoid possible lockup during hard shutdown [#997]
770
+
771
+ At this point, if you are experiencing stability issues with Sidekiq in
772
+ Ruby 1.9, please try Ruby 2.0. It seems to be more stable.
773
+
774
+ 2.12.2
775
+ -----------
776
+
777
+ - Relax slim version requirement to >= 1.1.0
778
+ - Refactor historical stats to use TTL, not explicit cleanup. [grosser, #971]
779
+
780
+ 2.12.1
781
+ -----------
782
+
783
+ - Force Celluloid 0.14.1 as 0.14.0 has a serious bug. [#954]
784
+ - Scheduled and Retry jobs now use Sidekiq::Client to push
785
+ jobs onto the queue, so they use client middleware. [dimko, #948]
786
+ - Record the timestamp when jobs are enqueued. Add
787
+ Sidekiq::Job#enqueued\_at to query the time. [mariovisic, #944]
788
+ - Add Sidekiq::Queue#latency - calculates diff between now and
789
+ enqueued\_at for the oldest job in the queue.
790
+ - Add testing method `perform_one` that dequeues and performs a single job.
791
+ This is mainly to aid testing jobs that spawn other jobs. [fumin, #963]
792
+
793
+ 2.12.0
794
+ -----------
795
+
796
+ - Upgrade to Celluloid 0.14, remove the use of Celluloid's thread
797
+ pool. This should halve the number of threads in each Sidekiq
798
+ process, thus requiring less resources. [#919]
799
+ - Abstract Celluloid usage to Sidekiq::Actor for testing purposes.
800
+ - Better handling for Redis downtime when fetching jobs and shutting
801
+ down, don't print exceptions every second and print success message
802
+ when Redis is back.
803
+ - Fix unclean shutdown leading to duplicate jobs [#897]
804
+ - Add Korean locale [#890]
805
+ - Upgrade test suite to Minitest 5
806
+ - Remove usage of `multi_json` as `json` is now robust on all platforms.
807
+
808
+ 2.11.2
809
+ -----------
810
+
811
+ - Fix Web UI when used without Rails [#886]
812
+ - Add Sidekiq::Stats#reset [#349]
813
+ - Add Norwegian locale.
814
+ - Updates for the JA locale.
815
+
816
+ 2.11.1
817
+ -----------
818
+
819
+ - Fix timeout warning.
820
+ - Add Dutch web UI locale.
821
+
822
+ 2.11.0
823
+ -----------
824
+
825
+ - Upgrade to Celluloid 0.13. [#834]
826
+ - Remove **timeout** support from `sidekiq_options`. Ruby's timeout
827
+ is inherently unsafe in a multi-threaded application and was causing
828
+ stability problems for many. See http://bit.ly/OtYpK
829
+ - Add Japanese locale for Web UI [#868]
830
+ - Fix a few issues with Web UI i18n.
831
+
832
+ 2.10.1
833
+ -----------
834
+
835
+ - Remove need for the i18n gem. (brandonhilkert)
836
+ - Improve redis connection info logging on startup for debugging
837
+ purposes [#858]
838
+ - Revert sinatra/slim as runtime dependencies
839
+ - Add `find_job` method to sidekiq/api
840
+
841
+
842
+ 2.10.0
843
+ -----------
844
+
845
+ - Refactor algorithm for putting scheduled jobs onto the queue [#843]
846
+ - Fix scheduler thread dying due to incorrect error handling [#839]
847
+ - Fix issue which left stale workers if Sidekiq wasn't shutdown while
848
+ quiet. [#840]
849
+ - I18n for web UI. Please submit translations of `web/locales/en.yml` for
850
+ your own language. [#811]
851
+ - 'sinatra', 'slim' and 'i18n' are now gem dependencies for Sidekiq.
852
+
853
+
854
+ 2.9.0
855
+ -----------
856
+
857
+ - Update 'sidekiq/testing' to work with any Sidekiq::Client call. It
858
+ also serializes the arguments as using Redis would. [#713]
859
+ - Raise a Sidekiq::Shutdown error within workers which don't finish within the hard
860
+ timeout. This is to prevent unwanted database transaction commits. [#377]
861
+ - Lazy load Redis connection pool, you no longer need to specify
862
+ anything in Passenger or Unicorn's after_fork callback [#794]
863
+ - Add optional Worker#retries_exhausted hook after max retries failed. [jkassemi, #780]
864
+ - Fix bug in pagination link to last page [pitr, #774]
865
+ - Upstart scripts for multiple Sidekiq instances [dariocravero, #763]
866
+ - Use select via pipes instead of poll to catch signals [mrnugget, #761]
867
+
868
+ 2.8.0
869
+ -----------
870
+
871
+ - I18n support! Sidekiq can optionally save and restore the Rails locale
872
+ so it will be properly set when your jobs execute. Just include
873
+ `require 'sidekiq/middleware/i18n'` in your sidekiq initializer. [#750]
874
+ - Fix bug which could lose messages when using namespaces and the message
875
+ needs to be requeued in Redis. [#744]
876
+ - Refactor Redis namespace support [#747]. The redis namespace can no longer be
877
+ passed via the config file, the only supported way is via Ruby in your
878
+ initializer:
879
+
880
+ ```ruby
881
+ sidekiq_redis = { :url => 'redis://localhost:3679', :namespace => 'foo' }
882
+ Sidekiq.configure_server { |config| config.redis = sidekiq_redis }
883
+ Sidekiq.configure_client { |config| config.redis = sidekiq_redis }
884
+ ```
885
+
886
+ A warning is printed out to the log if a namespace is found in your sidekiq.yml.
887
+
888
+
889
+ 2.7.5
890
+ -----------
891
+
892
+ - Capistrano no longer uses daemonization in order to work with JRuby [#719]
893
+ - Refactor signal handling to work on Ruby 2.0 [#728, #730]
894
+ - Fix dashboard refresh URL [#732]
895
+
896
+ 2.7.4
897
+ -----------
898
+
899
+ - Fixed daemonization, was broken by some internal refactoring in 2.7.3 [#727]
900
+
901
+ 2.7.3
902
+ -----------
903
+
904
+ - Real-time dashboard is now the default web page
905
+ - Make config file optional for capistrano
906
+ - Fix Retry All button in the Web UI
907
+
908
+ 2.7.2
909
+ -----------
910
+
911
+ - Remove gem signing infrastructure. It was causing Sidekiq to break
912
+ when used via git in Bundler. This is why we can't have nice things. [#688]
913
+
914
+
915
+ 2.7.1
916
+ -----------
917
+
918
+ - Fix issue with hard shutdown [#680]
919
+
920
+
921
+ 2.7.0
922
+ -----------
923
+
924
+ - Add -d daemonize flag, capistrano recipe has been updated to use it [#662]
925
+ - Support profiling via `ruby-prof` with -p. When Sidekiq is stopped
926
+ via Ctrl-C, it will output `profile.html`. You must add `gem 'ruby-prof'` to your Gemfile for it to work.
927
+ - Dynamically update Redis stats on dashboard [brandonhilkert]
928
+ - Add Sidekiq::Workers API giving programmatic access to the current
929
+ set of active workers.
930
+
931
+ ```
932
+ workers = Sidekiq::Workers.new
933
+ workers.size => 2
934
+ workers.each do |name, work|
935
+ # name is a unique identifier per Processor instance
936
+ # work is a Hash which looks like:
937
+ # { 'queue' => name, 'run_at' => timestamp, 'payload' => msg }
938
+ end
939
+ ```
940
+
941
+ - Allow environment-specific sections within the config file which
942
+ override the global values [dtaniwaki, #630]
943
+
944
+ ```
945
+ ---
946
+ :concurrency: 50
947
+ :verbose: false
948
+ staging:
949
+ :verbose: true
950
+ :concurrency: 5
951
+ ```
952
+
953
+
954
+ 2.6.5
955
+ -----------
956
+
957
+ - Several reliability fixes for job requeueing upon termination [apinstein, #622, #624]
958
+ - Fix typo in capistrano recipe
959
+ - Add `retry_queue` option so retries can be given lower priority [ryanlower, #620]
960
+
961
+ ```ruby
962
+ sidekiq_options queue: 'high', retry_queue: 'low'
963
+ ```
964
+
965
+ 2.6.4
966
+ -----------
967
+
968
+ - Fix crash upon empty queue [#612]
969
+
970
+ 2.6.3
971
+ -----------
972
+
973
+ - sidekiqctl exits with non-zero exit code upon error [jmazzi]
974
+ - better argument validation in Sidekiq::Client [karlfreeman]
975
+
976
+ 2.6.2
977
+ -----------
978
+
979
+ - Add Dashboard beacon indicating when stats are updated. [brandonhilkert, #606]
980
+ - Revert issue with capistrano restart. [#598]
981
+
982
+ 2.6.1
983
+ -----------
984
+
985
+ - Dashboard now live updates summary stats also. [brandonhilkert, #605]
986
+ - Add middleware chain APIs `insert_before` and `insert_after` for fine
987
+ tuning the order of middleware. [jackrg, #595]
988
+
989
+ 2.6.0
990
+ -----------
991
+
992
+ - Web UI much more mobile friendly now [brandonhilkert, #573]
993
+ - Enable live polling for every section in Web UI [brandonhilkert, #567]
994
+ - Add Stats API [brandonhilkert, #565]
995
+ - Add Stats::History API [brandonhilkert, #570]
996
+ - Add Dashboard to Web UI with live and historical stat graphs [brandonhilkert, #580]
997
+ - Add option to log output to a file, reopen log file on USR2 signal [mrnugget, #581]
998
+
999
+ 2.5.4
1000
+ -----------
1001
+
1002
+ - `Sidekiq::Client.push` now accepts the worker class as a string so the
1003
+ Sidekiq client does not have to load your worker classes at all. [#524]
1004
+ - `Sidekiq::Client.push_bulk` now works with inline testing.
1005
+ - **Really** fix status icon in Web UI this time.
1006
+ - Add "Delete All" and "Retry All" buttons to Retries in Web UI
1007
+
1008
+
1009
+ 2.5.3
1010
+ -----------
1011
+
1012
+ - Small Web UI fixes
1013
+ - Add `delay_until` so you can delay jobs until a specific timestamp:
1014
+
1015
+ ```ruby
1016
+ Auction.delay_until(@auction.ends_at).close(@auction.id)
1017
+ ```
1018
+
1019
+ This is identical to the existing Sidekiq::Worker method, `perform_at`.
1020
+
1021
+ 2.5.2
1022
+ -----------
1023
+
1024
+ - Remove asset pipeline from Web UI for much faster, simpler runtime. [#499, #490, #481]
1025
+ - Add -g option so the procline better identifies a Sidekiq process, defaults to File.basename(Rails.root). [#486]
1026
+
1027
+ sidekiq 2.5.1 myapp [0 of 25 busy]
1028
+
1029
+ - Add splay to retry time so groups of failed jobs don't fire all at once. [#483]
1030
+
1031
+ 2.5.1
1032
+ -----------
1033
+
1034
+ - Fix issues with core\_ext
1035
+
1036
+ 2.5.0
1037
+ -----------
1038
+
1039
+ - REDESIGNED WEB UI! [unity, cavneb]
1040
+ - Support Honeybadger for error delivery
1041
+ - Inline testing runs the client middleware before executing jobs [#465]
1042
+ - Web UI can now remove jobs from queue. [#466, dleung]
1043
+ - Web UI can now show the full message, not just 100 chars [#464, dleung]
1044
+ - Add APIs for manipulating the retry and job queues. See sidekiq/api. [#457]
1045
+
1046
+
1047
+ 2.4.0
1048
+ -----------
1049
+
1050
+ - ActionMailer.delay.method now only tries to deliver if method returns a valid message.
1051
+ - Logging now uses "MSG-#{Job ID}", not a random msg ID
1052
+ - Allow generic Redis provider as environment variable. [#443]
1053
+ - Add ability to customize sidekiq\_options with delay calls [#450]
1054
+
1055
+ ```ruby
1056
+ Foo.delay(:retry => false).bar
1057
+ Foo.delay(:retry => 10).bar
1058
+ Foo.delay(:timeout => 10.seconds).bar
1059
+ Foo.delay_for(5.minutes, :timeout => 10.seconds).bar
1060
+ ```
1061
+
1062
+ 2.3.3
1063
+ -----------
1064
+
1065
+ - Remove option to disable Rails hooks. [#401]
1066
+ - Allow delay of any module class method
1067
+
1068
+ 2.3.2
1069
+ -----------
1070
+
1071
+ - Fix retry. 2.3.1 accidentally disabled it.
1072
+
1073
+ 2.3.1
1074
+ -----------
1075
+
1076
+ - Add Sidekiq::Client.push\_bulk for bulk adding of jobs to Redis.
1077
+ My own simple test case shows pushing 10,000 jobs goes from 5 sec to 1.5 sec.
1078
+ - Add support for multiple processes per host to Capistrano recipe
1079
+ - Re-enable Celluloid::Actor#defer to fix stack overflow issues [#398]
1080
+
1081
+ 2.3.0
1082
+ -----------
1083
+
1084
+ - Upgrade Celluloid to 0.12
1085
+ - Upgrade Twitter Bootstrap to 2.1.0
1086
+ - Rescue more Exceptions
1087
+ - Change Job ID to be Hex, rather than Base64, for HTTP safety
1088
+ - Use `Airbrake#notify_or_ignore`
1089
+
1090
+ 2.2.1
1091
+ -----------
1092
+
1093
+ - Add support for custom tabs to Sidekiq::Web [#346]
1094
+ - Change capistrano recipe to run 'quiet' before deploy:update\_code so
1095
+ it is run upon both 'deploy' and 'deploy:migrations'. [#352]
1096
+ - Rescue Exception rather than StandardError to catch and log any sort
1097
+ of Processor death.
1098
+
1099
+ 2.2.0
1100
+ -----------
1101
+
1102
+ - Roll back Celluloid optimizations in 2.1.0 which caused instability.
1103
+ - Add extension to delay any arbitrary class method to Sidekiq.
1104
+ Previously this was limited to ActiveRecord classes.
1105
+
1106
+ ```ruby
1107
+ SomeClass.delay.class_method(1, 'mike', Date.today)
1108
+ ```
1109
+
1110
+ - Sidekiq::Client now generates and returns a random, 128-bit Job ID 'jid' which
1111
+ can be used to track the processing of a Job, e.g. for calling back to a webhook
1112
+ when a job is finished.
1113
+
1114
+ 2.1.1
1115
+ -----------
1116
+
1117
+ - Handle networking errors causing the scheduler thread to die [#309]
1118
+ - Rework exception handling to log all Processor and actor death (#325, subelsky)
1119
+ - Clone arguments when calling worker so modifications are discarded. (#265, hakanensari)
1120
+
1121
+ 2.1.0
1122
+ -----------
1123
+
1124
+ - Tune Celluloid to no longer run message processing within a Fiber.
1125
+ This gives us a full Thread stack and also lowers Sidekiq's memory
1126
+ usage.
1127
+ - Add pagination within the Web UI [#253]
1128
+ - Specify which Redis driver to use: *hiredis* or *ruby* (default)
1129
+ - Remove FailureJobs and UniqueJobs, which were optional middleware
1130
+ that I don't want to support in core. [#302]
1131
+
1132
+ 2.0.3
1133
+ -----------
1134
+ - Fix sidekiq-web's navbar on mobile devices and windows under 980px (ezkl)
1135
+ - Fix Capistrano task for first deploys [#259]
1136
+ - Worker subclasses now properly inherit sidekiq\_options set in
1137
+ their superclass [#221]
1138
+ - Add random jitter to scheduler to spread polls across POLL\_INTERVAL
1139
+ window. [#247]
1140
+ - Sidekiq has a new mailing list: sidekiq@librelist.org See README.
1141
+
1142
+ 2.0.2
1143
+ -----------
1144
+
1145
+ - Fix "Retry Now" button on individual retry page. (ezkl)
1146
+
1147
+ 2.0.1
1148
+ -----------
1149
+
1150
+ - Add "Clear Workers" button to UI. If you kill -9 Sidekiq, the workers
1151
+ set can fill up with stale entries.
1152
+ - Update sidekiq/testing to support new scheduled jobs API:
1153
+
1154
+ ```ruby
1155
+ require 'sidekiq/testing'
1156
+ DirectWorker.perform_in(10.seconds, 1, 2)
1157
+ assert_equal 1, DirectWorker.jobs.size
1158
+ assert_in_delta 10.seconds.from_now.to_f, DirectWorker.jobs.last['at'], 0.01
1159
+ ```
1160
+
1161
+ 2.0.0
1162
+ -----------
1163
+
1164
+ - **SCHEDULED JOBS**!
1165
+
1166
+ You can now use `perform_at` and `perform_in` to schedule jobs
1167
+ to run at arbitrary points in the future, like so:
1168
+
1169
+ ```ruby
1170
+ SomeWorker.perform_in(5.days, 'bob', 13)
1171
+ SomeWorker.perform_at(5.days.from_now, 'bob', 13)
1172
+ ```
1173
+
1174
+ It also works with the delay extensions:
1175
+
1176
+ ```ruby
1177
+ UserMailer.delay_for(5.days).send_welcome_email(user.id)
1178
+ ```
1179
+
1180
+ The time is approximately when the job will be placed on the queue;
1181
+ it is not guaranteed to run at precisely at that moment in time.
1182
+
1183
+ This functionality is meant for one-off, arbitrary jobs. I still
1184
+ recommend `whenever` or `clockwork` if you want cron-like,
1185
+ recurring jobs. See `examples/scheduling.rb`
1186
+
1187
+ I want to specially thank @yabawock for his work on sidekiq-scheduler.
1188
+ His extension for Sidekiq 1.x filled an obvious functional gap that I now think is
1189
+ useful enough to implement in Sidekiq proper.
1190
+
1191
+ - Fixed issues due to Redis 3.x API changes. Sidekiq now requires
1192
+ the Redis 3.x client.
1193
+ - Inline testing now round trips arguments through JSON to catch
1194
+ serialization issues (betelgeuse)
1195
+
1196
+ 1.2.1
1197
+ -----------
1198
+
1199
+ - Sidekiq::Worker now has access to Sidekiq's standard logger
1200
+ - Fix issue with non-StandardErrors leading to Processor exhaustion
1201
+ - Fix issue with Fetcher slowing Sidekiq shutdown
1202
+ - Print backtraces for all threads upon TTIN signal [#183]
1203
+ - Overhaul retries Web UI with new index page and bulk operations [#184]
1204
+
1205
+ 1.2.0
1206
+ -----------
1207
+
1208
+ - Full or partial error backtraces can optionally be stored as part of the retry
1209
+ for display in the web UI if you aren't using an error service. [#155]
1210
+
1211
+ ```ruby
1212
+ class Worker
1213
+ include Sidekiq::Worker
1214
+ sidekiq_options :backtrace => [true || 10]
1215
+ end
1216
+ ```
1217
+ - Add timeout option to kill a worker after N seconds (blackgold9)
1218
+
1219
+ ```ruby
1220
+ class HangingWorker
1221
+ include Sidekiq::Worker
1222
+ sidekiq_options :timeout => 600
1223
+ def perform
1224
+ # will be killed if it takes longer than 10 minutes
1225
+ end
1226
+ end
1227
+ ```
1228
+
1229
+ - Fix delayed extensions not available in workers [#152]
1230
+ - In test environments add the `#drain` class method to workers. This method
1231
+ executes all previously queued jobs. (panthomakos)
1232
+ - Sidekiq workers can be run inline during tests, just `require 'sidekiq/testing/inline'` (panthomakos)
1233
+ - Queues can now be deleted from the Sidekiq web UI [#154]
1234
+ - Fix unnecessary shutdown delay due to Retry Poller [#174]
1235
+
1236
+ 1.1.4
1237
+ -----------
1238
+
1239
+ - Add 24 hr expiry for basic keys set in Redis, to avoid any possible leaking.
1240
+ - Only register workers in Redis while working, to avoid lingering
1241
+ workers [#156]
1242
+ - Speed up shutdown significantly.
1243
+
1244
+ 1.1.3
1245
+ -----------
1246
+
1247
+ - Better network error handling when fetching jobs from Redis.
1248
+ Sidekiq will retry once per second until it can re-establish
1249
+ a connection. (ryanlecompte)
1250
+ - capistrano recipe now uses `bundle_cmd` if set [#147]
1251
+ - handle multi\_json API changes (sferik)
1252
+
1253
+ 1.1.2
1254
+ -----------
1255
+
1256
+ - Fix double restart with cap deploy [#137]
1257
+
1258
+ 1.1.1
1259
+ -----------
1260
+
1261
+ - Set procline for easy monitoring of Sidekiq status via "ps aux"
1262
+ - Fix race condition on shutdown [#134]
1263
+ - Fix hang with cap sidekiq:start [#131]
1264
+
1265
+ 1.1.0
1266
+ -----------
1267
+
1268
+ - The Sidekiq license has switched from GPLv3 to LGPLv3!
1269
+ - Sidekiq::Client.push now returns whether the actual Redis
1270
+ operation succeeded or not. [#123]
1271
+ - Remove UniqueJobs from the default middleware chain. Its
1272
+ functionality, while useful, is unexpected for new Sidekiq
1273
+ users. You can re-enable it with the following config.
1274
+ Read #119 for more discussion.
1275
+
1276
+ ```ruby
1277
+ Sidekiq.configure_client do |config|
1278
+ require 'sidekiq/middleware/client/unique_jobs'
1279
+ config.client_middleware do |chain|
1280
+ chain.add Sidekiq::Middleware::Client::UniqueJobs
1281
+ end
1282
+ end
1283
+ Sidekiq.configure_server do |config|
1284
+ require 'sidekiq/middleware/server/unique_jobs'
1285
+ config.server_middleware do |chain|
1286
+ chain.add Sidekiq::Middleware::Server::UniqueJobs
1287
+ end
1288
+ end
1289
+ ```
1290
+
1291
+ 1.0.0
1292
+ -----------
1293
+
1294
+ Thanks to all Sidekiq users and contributors for helping me
1295
+ get to this big milestone!
1296
+
1297
+ - Default concurrency on client-side to 5, not 25 so we don't
1298
+ create as many unused Redis connections, same as ActiveRecord's
1299
+ default pool size.
1300
+ - Ensure redis= is given a Hash or ConnectionPool.
1301
+
1302
+ 0.11.2
1303
+ -----------
1304
+
1305
+ - Implement "safe shutdown". The messages for any workers that
1306
+ are still busy when we hit the TERM timeout will be requeued in
1307
+ Redis so the messages are not lost when the Sidekiq process exits.
1308
+ [#110]
1309
+ - Work around Celluloid's small 4kb stack limit [#115]
1310
+ - Add support for a custom Capistrano role to limit Sidekiq to
1311
+ a set of machines. [#113]
1312
+
1313
+ 0.11.1
1314
+ -----------
1315
+
1316
+ - Fix fetch breaking retry when used with Redis namespaces. [#109]
1317
+ - Redis connection now just a plain ConnectionPool, not CP::Wrapper.
1318
+ - Capistrano initial deploy fix [#106]
1319
+ - Re-implemented weighted queues support (ryanlecompte)
1320
+
1321
+ 0.11.0
1322
+ -----------
1323
+
1324
+ - Client-side API changes, added sidekiq\_options for Sidekiq::Worker.
1325
+ As a side effect of this change, the client API works on Ruby 1.8.
1326
+ It's not officially supported but should work [#103]
1327
+ - NO POLL! Sidekiq no longer polls Redis, leading to lower network
1328
+ utilization and lower latency for message processing.
1329
+ - Add --version CLI option
1330
+
1331
+ 0.10.1
1332
+ -----------
1333
+
1334
+ - Add details page for jobs in retry queue (jcoene)
1335
+ - Display relative timestamps in web interface (jcoene)
1336
+ - Capistrano fixes (hinrik, bensie)
1337
+
1338
+ 0.10.0
1339
+ -----------
1340
+
1341
+ - Reworked capistrano recipe to make it more fault-tolerant [#94].
1342
+ - Automatic failure retry! Sidekiq will now save failed messages
1343
+ and retry them, with an exponential backoff, over about 20 days.
1344
+ Did a message fail to process? Just deploy a bug fix in the next
1345
+ few days and Sidekiq will retry the message eventually.
1346
+
1347
+ 0.9.1
1348
+ -----------
1349
+
1350
+ - Fix missed deprecations, poor method name in web UI
1351
+
1352
+ 0.9.0
1353
+ -----------
1354
+
1355
+ - Add -t option to configure the TERM shutdown timeout
1356
+ - TERM shutdown timeout is now configurable, defaults to 5 seconds.
1357
+ - USR1 signal now stops Sidekiq from accepting new work,
1358
+ capistrano sends USR1 at start of deploy and TERM at end of deploy
1359
+ giving workers the maximum amount of time to finish.
1360
+ - New Sidekiq::Web rack application available
1361
+ - Updated Sidekiq.redis API
1362
+
1363
+ 0.8.0
1364
+ -----------
1365
+
1366
+ - Remove :namespace and :server CLI options (mperham)
1367
+ - Add ExceptionNotifier support (masterkain)
1368
+ - Add capistrano support (mperham)
1369
+ - Workers now log upon start and finish (mperham)
1370
+ - Messages for terminated workers are now automatically requeued (mperham)
1371
+ - Add support for Exceptional error reporting (bensie)
1372
+
1373
+ 0.7.0
1374
+ -----------
1375
+
1376
+ - Example chef recipe and monitrc script (jc00ke)
1377
+ - Refactor global configuration into Sidekiq.configure\_server and
1378
+ Sidekiq.configure\_client blocks. (mperham)
1379
+ - Add optional middleware FailureJobs which saves failed jobs to a
1380
+ 'failed' queue (fbjork)
1381
+ - Upon shutdown, workers are now terminated after 5 seconds. This is to
1382
+ meet Heroku's hard limit of 10 seconds for a process to shutdown. (mperham)
1383
+ - Refactor middleware API for simplicity, see sidekiq/middleware/chain. (mperham)
1384
+ - Add `delay` extensions for ActionMailer and ActiveRecord. (mperham)
1385
+ - Added config file support. See test/config.yml for an example file. (jc00ke)
1386
+ - Added pidfile for tools like monit (jc00ke)
1387
+
1388
+ 0.6.0
1389
+ -----------
1390
+
1391
+ - Resque-compatible processing stats in redis (mperham)
1392
+ - Simple client testing support in sidekiq/testing (mperham)
1393
+ - Plain old Ruby support via the -r cli flag (mperham)
1394
+ - Refactored middleware support, introducing ability to add client-side middleware (ryanlecompte)
1395
+ - Added middleware for ignoring duplicate jobs (ryanlecompte)
1396
+ - Added middleware for displaying jobs in resque-web dashboard (maxjustus)
1397
+ - Added redis namespacing support (maxjustus)
1398
+
1399
+ 0.5.1
1400
+ -----------
1401
+
1402
+ - Initial release!