sidekiq 5.0.0 → 6.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 (79) hide show
  1. checksums.yaml +5 -5
  2. data/.circleci/config.yml +61 -0
  3. data/.github/issue_template.md +3 -1
  4. data/.gitignore +1 -1
  5. data/.standard.yml +20 -0
  6. data/6.0-Upgrade.md +70 -0
  7. data/COMM-LICENSE +12 -10
  8. data/Changes.md +169 -1
  9. data/Ent-2.0-Upgrade.md +37 -0
  10. data/Ent-Changes.md +76 -0
  11. data/Gemfile +16 -21
  12. data/Gemfile.lock +196 -0
  13. data/LICENSE +1 -1
  14. data/Pro-4.0-Upgrade.md +35 -0
  15. data/Pro-5.0-Upgrade.md +25 -0
  16. data/Pro-Changes.md +137 -1
  17. data/README.md +18 -30
  18. data/Rakefile +6 -8
  19. data/bin/sidekiqload +28 -24
  20. data/bin/sidekiqmon +9 -0
  21. data/lib/generators/sidekiq/templates/worker_spec.rb.erb +1 -1
  22. data/lib/generators/sidekiq/templates/worker_test.rb.erb +1 -1
  23. data/lib/generators/sidekiq/worker_generator.rb +12 -14
  24. data/lib/sidekiq.rb +69 -49
  25. data/lib/sidekiq/api.rb +216 -160
  26. data/lib/sidekiq/cli.rb +174 -207
  27. data/lib/sidekiq/client.rb +55 -51
  28. data/lib/sidekiq/delay.rb +24 -4
  29. data/lib/sidekiq/exception_handler.rb +12 -16
  30. data/lib/sidekiq/extensions/action_mailer.rb +10 -20
  31. data/lib/sidekiq/extensions/active_record.rb +9 -7
  32. data/lib/sidekiq/extensions/class_methods.rb +9 -7
  33. data/lib/sidekiq/extensions/generic_proxy.rb +4 -4
  34. data/lib/sidekiq/fetch.rb +5 -6
  35. data/lib/sidekiq/job_logger.rb +42 -14
  36. data/lib/sidekiq/job_retry.rb +71 -57
  37. data/lib/sidekiq/launcher.rb +74 -60
  38. data/lib/sidekiq/logger.rb +69 -0
  39. data/lib/sidekiq/manager.rb +12 -15
  40. data/lib/sidekiq/middleware/chain.rb +3 -2
  41. data/lib/sidekiq/middleware/i18n.rb +5 -7
  42. data/lib/sidekiq/monitor.rb +148 -0
  43. data/lib/sidekiq/paginator.rb +11 -12
  44. data/lib/sidekiq/processor.rb +126 -82
  45. data/lib/sidekiq/rails.rb +24 -32
  46. data/lib/sidekiq/redis_connection.rb +46 -14
  47. data/lib/sidekiq/scheduled.rb +50 -25
  48. data/lib/sidekiq/testing.rb +35 -27
  49. data/lib/sidekiq/testing/inline.rb +2 -1
  50. data/lib/sidekiq/util.rb +20 -14
  51. data/lib/sidekiq/version.rb +2 -1
  52. data/lib/sidekiq/web.rb +45 -53
  53. data/lib/sidekiq/web/action.rb +14 -10
  54. data/lib/sidekiq/web/application.rb +83 -58
  55. data/lib/sidekiq/web/helpers.rb +105 -67
  56. data/lib/sidekiq/web/router.rb +18 -15
  57. data/lib/sidekiq/worker.rb +144 -41
  58. data/sidekiq.gemspec +16 -27
  59. data/web/assets/javascripts/application.js +0 -0
  60. data/web/assets/javascripts/dashboard.js +21 -23
  61. data/web/assets/stylesheets/application.css +35 -2
  62. data/web/assets/stylesheets/bootstrap.css +2 -2
  63. data/web/locales/ar.yml +1 -0
  64. data/web/locales/en.yml +2 -0
  65. data/web/locales/es.yml +4 -3
  66. data/web/locales/ja.yml +7 -4
  67. data/web/views/_footer.erb +4 -1
  68. data/web/views/_nav.erb +3 -17
  69. data/web/views/busy.erb +5 -1
  70. data/web/views/layout.erb +1 -1
  71. data/web/views/queue.erb +1 -0
  72. data/web/views/queues.erb +2 -0
  73. data/web/views/retries.erb +4 -0
  74. metadata +25 -171
  75. data/.travis.yml +0 -18
  76. data/bin/sidekiqctl +0 -99
  77. data/lib/sidekiq/core_ext.rb +0 -119
  78. data/lib/sidekiq/logging.rb +0 -106
  79. data/lib/sidekiq/middleware/server/active_record.rb +0 -22
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: f2a9cd7270e53981aaf7b3f2639596ff042f5ae3
4
- data.tar.gz: 7b6e4fbfee794de34d9b6b15772cbf085e05a65b
2
+ SHA256:
3
+ metadata.gz: fda3ed37e1d981e1b32eea70669c678d400c071a9146a919848bcc598612de25
4
+ data.tar.gz: 6580ab6c188b2514efe807479ca25c06ea584d1def175d84d94639bc20f80b1e
5
5
  SHA512:
6
- metadata.gz: dfaecc27ce4071e36b5ab994c27f59d85b4cf7f16ca05a5b786c79125c311f58fbb38b94f7e1c71e4dbf90e6645cb358102e8940a94881981f7bbc2578fd18ff
7
- data.tar.gz: a98e9b87e5f4abe2580ea5fcb6f20ef1d28623eae9be4ca758d5f5b52c65dbef7a6b5df74f673449177f36494b9075573315c7ef6cd6b757ba6a59e825737833
6
+ metadata.gz: 25682d3dbf99d29fa3f56b7c74419863d3549b6e0c182e69c83fbc02a2955d053bca85eec53b474d4d22c7526e44e865f378aa4111152a91377b373be27c4d47
7
+ data.tar.gz: e55d07434b1e2ab26df6748101bf10640fc08d4d93f00b75ed04d82ed309ee8529d652982430cd00671c98b5e53cc733bef4b686df58a6b0e116ba04c12139aa
@@ -0,0 +1,61 @@
1
+ version: 2
2
+ references:
3
+ unit: &unit
4
+ run:
5
+ name: Run test suite
6
+ command: bundle exec rake
7
+ restore: &restore
8
+ restore_cache:
9
+ keys:
10
+ - v1-dependencies-{{ checksum "Gemfile.lock" }}
11
+ # fallback to using the latest cache if no exact match is found
12
+ - v1-dependencies-
13
+ bundle: &bundle
14
+ run:
15
+ name: install dependencies
16
+ command: |
17
+ bundle install --jobs=4 --retry=3 --path vendor/bundle
18
+ save: &save
19
+ save_cache:
20
+ paths:
21
+ - ./vendor/bundle
22
+ key: v1-dependencies-{{ checksum "Gemfile.lock" }}
23
+ jobs:
24
+ "ruby-2.5":
25
+ docker:
26
+ - image: circleci/ruby:2.5
27
+ - image: circleci/redis:4.0
28
+ steps:
29
+ - checkout
30
+ - <<: *restore
31
+ - <<: *bundle
32
+ - <<: *save
33
+ - <<: *unit
34
+ "ruby-2.6":
35
+ docker:
36
+ - image: circleci/ruby:2.6
37
+ - image: circleci/redis:4.0
38
+ steps:
39
+ - checkout
40
+ - <<: *restore
41
+ - <<: *bundle
42
+ - <<: *save
43
+ - <<: *unit
44
+ "jruby":
45
+ docker:
46
+ - image: circleci/jruby:latest
47
+ - image: circleci/redis:4.0
48
+ steps:
49
+ - checkout
50
+ - <<: *restore
51
+ - <<: *bundle
52
+ - <<: *save
53
+ - <<: *unit
54
+
55
+ workflows:
56
+ version: 2
57
+ build:
58
+ jobs:
59
+ - "ruby-2.5"
60
+ - "ruby-2.6"
61
+ - "jruby"
@@ -4,6 +4,8 @@ Sidekiq / Pro / Enterprise version(s):
4
4
  Please include your initializer and any error message with the full backtrace.
5
5
 
6
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?
7
+ Have you checked the changelogs to see if your issue has been fixed in a later version?
8
8
 
9
9
  https://github.com/mperham/sidekiq/blob/master/Changes.md
10
+ https://github.com/mperham/sidekiq/blob/master/Pro-Changes.md
11
+ https://github.com/mperham/sidekiq/blob/master/Ent-Changes.md
data/.gitignore CHANGED
@@ -1,7 +1,6 @@
1
1
  .rvmrc
2
2
  .ruby-version
3
3
  tags
4
- Gemfile.lock
5
4
  *.swp
6
5
  dump.rdb
7
6
  .rbx
@@ -11,3 +10,4 @@ vendor/
11
10
  .sass-cache/
12
11
  tmp/
13
12
  pkg/*.gem
13
+ .byebug_history
@@ -0,0 +1,20 @@
1
+ ruby_version: 2.5.0
2
+ fix: false
3
+ parallel: true
4
+ ignore:
5
+ - test/**/*
6
+ - examples/**/*
7
+ - myapp/**/*
8
+ - 'lib/sidekiq.rb':
9
+ - Lint/InheritException
10
+ - 'lib/sidekiq/extensions/**/*':
11
+ - Style/MethodMissingSuper
12
+ - Style/MissingRespondToMissing
13
+ - 'lib/**/*':
14
+ - Naming/AsciiIdentifiers
15
+ - Lint/RescueException
16
+ - Security/YAMLLoad
17
+ - Naming/AccessorMethodName
18
+ - Naming/MethodName
19
+ - Style/GlobalVars
20
+ - Style/Alias
@@ -0,0 +1,70 @@
1
+ # Welcome to Sidekiq 6.0!
2
+
3
+ Sidekiq 6.0 contains some breaking changes which streamline proper operation
4
+ of Sidekiq. It also drops support for EOL versions of Ruby and Rails.
5
+
6
+ ## What's New
7
+
8
+ This release has major breaking changes. Read and test carefully in production.
9
+
10
+ - ActiveJobs can now use `sidekiq_options` directly to configure Sidekiq
11
+ features/internals like the retry subsystem. Prefer the native
12
+ Sidekiq::Worker APIs as some Sidekiq features (e.g. unique jobs) do not work well with AJ.
13
+ ```ruby
14
+ class MyJob < ActiveJob::Base
15
+ queue_as :myqueue
16
+ sidekiq_options retry: 10, backtrace: 20
17
+ def perform(...)
18
+ end
19
+ end
20
+ ```
21
+ - Logging has been redesigned to allow pluggable formatters and several
22
+ formats ship with Sidekiq:
23
+ * default - your typical output on macOS
24
+ * heroku - enabled specifically when running in Heroku
25
+ * json - a JSON format for search indexing, one hash per line
26
+
27
+ Sidekiq will enable the best formatter for the detected environment but
28
+ you can override it by configuring the log formatter explicitly. See
29
+ 'sidekiq/logger' for implementation details.
30
+
31
+ ```ruby
32
+ Sidekiq.configure_server do |config|
33
+ config.log_formatter = AcmeCorp::PlainLogFormatter.new
34
+ # config.log_formatter = Sidekiq::Logger::Format::JSON.new
35
+ end
36
+ ```
37
+ - **Remove the daemonization, logfile and pidfile command line arguments and `sidekiqctl` binary**.
38
+ I've [noted for years](https://www.mikeperham.com/2014/09/22/dont-daemonize-your-daemons/)
39
+ how modern services should be managed with a proper init system.
40
+ Managing services manually is more error-prone, let your operating system do it for you.
41
+ systemd, upstart, and foreman are three options. See the Deployment wiki page for the latest details.
42
+ - **Validate proper usage of the `REDIS_PROVIDER` variable.**
43
+ This variable is meant to hold the name of the environment
44
+ variable which contains your Redis URL, so that you can switch Redis
45
+ providers quickly and easily with a single variable change. It is not
46
+ meant to hold the actual Redis URL itself. If you want to manually set
47
+ the Redis URL then you may set `REDIS_URL` directly. [#3969]
48
+ - **Increase default shutdown timeout from 8 seconds to 25 seconds.**
49
+ Both Heroku and ECS now use 30 second shutdown timeout
50
+ by default and we want Sidekiq to take advantage of this time. If you
51
+ have deployment scripts which depend on the old default timeout, use `-t 8` to
52
+ get the old behavior. [#3968]
53
+ * **Rails <5** is no longer supported. Rails 6+ only works in zeitwerk mode.
54
+ * **Ruby <2.5** is no longer supported.
55
+ * **Redis <4** is no longer supported.
56
+
57
+ ## Upgrade
58
+
59
+ As always, please upgrade Sidekiq **one major version at a time**.
60
+ If you are already running Sidekiq 5.x, then:
61
+
62
+ * Upgrade to the latest Sidekiq 5.x.
63
+ ```ruby
64
+ gem 'sidekiq', '< 6'
65
+ ```
66
+ * Fix any deprecation warnings you see.
67
+ * Upgrade to 6.x.
68
+ ```ruby
69
+ gem 'sidekiq', '< 7'
70
+ ```
@@ -14,13 +14,15 @@ In order to use the Software under this Agreement, you must receive a “Source
14
14
 
15
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
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.
17
+ 1.3 Limited Enterprise License. If you purchased a Limited License for 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
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.
19
+ 1.4 Enterprise Site License. If you purchased a Site License for 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. 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.
20
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.
21
+ 1.5 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.
22
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”).
23
+ 1.6 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.
24
+
25
+ 1.7 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
26
 
25
27
  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
28
 
@@ -31,18 +33,18 @@ In order to use the Software under this Agreement, you must receive a “Source
31
33
  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
34
 
33
35
  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
36
+ under the terms of the GNU Lesser General Public License version 3.0
35
37
  (“LGPL”) and not under this EULA.
36
38
 
37
39
  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
40
 
39
41
  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
42
 
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.
43
+ 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/Commercial-Support), support and maintenance services may be included with the purchase of your license subscription.
42
44
 
43
45
  7. Term of Agreement.
44
46
 
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.
47
+ 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
48
 
47
49
  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
50
 
@@ -57,7 +59,7 @@ In no event will Contributed Systems be liable for any direct, indirect, consequ
57
59
 
58
60
  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
61
 
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.
62
+ 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
63
 
62
64
  11. Acknowledgements.
63
65
 
@@ -67,7 +69,7 @@ In no event will Contributed Systems' liability exceed the Software license pric
67
69
 
68
70
  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
71
 
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.
72
+ 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
73
 
72
74
 
73
75
  13. Miscellaneous
@@ -84,7 +86,7 @@ In no event will Contributed Systems' liability exceed the Software license pric
84
86
 
85
87
  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
88
 
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.
89
+ 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
90
 
89
91
  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
92
 
data/Changes.md CHANGED
@@ -2,6 +2,174 @@
2
2
 
3
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
4
 
5
+ 6.0
6
+ ---------
7
+
8
+ This release has major breaking changes. Read and test carefully in production.
9
+
10
+ - ActiveJobs can now use `sidekiq_options` directly to configure Sidekiq
11
+ features/internals like the retry subsystem. [#4213, pirj]
12
+ ```ruby
13
+ class MyJob < ActiveJob::Base
14
+ queue_as :myqueue
15
+ sidekiq_options retry: 10, backtrace: 20
16
+ def perform(...)
17
+ end
18
+ end
19
+ ```
20
+ - **BREAKING CHANGE** Validate proper usage of the `REDIS_PROVIDER`
21
+ variable. This variable is meant to hold the name of the environment
22
+ variable which contains your Redis URL, so that you can switch Redis
23
+ providers quickly and easily with a single variable change. It is not
24
+ meant to hold the actual Redis URL itself. If you want to manually set
25
+ the Redis URL (not recommended as it implies you have no failover),
26
+ then you may set `REDIS_URL` directly. [#3969]
27
+ - **BREAKING CHANGE** Increase default shutdown timeout from 8 seconds
28
+ to 25 seconds. Both Heroku and ECS now use 30 second shutdown timeout
29
+ by default and we want Sidekiq to take advantage of this time. If you
30
+ have deployment scripts which depend on the old default timeout, use `-t 8` to
31
+ get the old behavior. [#3968]
32
+ - **BREAKING CHANGE** Remove the daemonization, logfile and pidfile
33
+ arguments to Sidekiq. Use a proper process supervisor (e.g. systemd or
34
+ foreman) to manage Sidekiq. See the Deployment wiki page for links to
35
+ more resources.
36
+ - Integrate the StandardRB code formatter to ensure consistent code
37
+ styling. [#4114, gearnode]
38
+
39
+ 5.2.7
40
+ ---------
41
+
42
+ - Fix stale `enqueued_at` when retrying [#4149]
43
+ - Move build to [Circle CI](https://circleci.com/gh/mperham/sidekiq) [#4120]
44
+
45
+ 5.2.6
46
+ ---------
47
+
48
+ - Fix edge case where a job failure during Redis outage could result in a lost job [#4141]
49
+ - Better handling of malformed job arguments in payload [#4095]
50
+ - Restore bootstap's dropdown css component [#4099, urkle]
51
+ - Display human-friendly time diff for longer queue latencies [#4111, interlinked]
52
+ - Allow `Sidekiq::Worker#set` to be chained
53
+
54
+ 5.2.5
55
+ ---------
56
+
57
+ - Fix default usage of `config/sidekiq.yml` [#4077, Tensho]
58
+
59
+ 5.2.4
60
+ ---------
61
+
62
+ - Add warnings for various deprecations and changes coming in Sidekiq 6.0.
63
+ See the 6-0 branch. [#4056]
64
+ - Various improvements to the Sidekiq test suite and coverage [#4026, #4039, Tensho]
65
+
66
+ 5.2.3
67
+ ---------
68
+
69
+ - Warning message on invalid REDIS\_PROVIDER [#3970]
70
+ - Add `sidekiqctl status` command [#4003, dzunk]
71
+ - Update elapsed time calculatons to use monotonic clock [#3999]
72
+ - Fix a few issues with mobile Web UI styling [#3973, navied]
73
+ - Jobs with `retry: false` now go through the global `death_handlers`,
74
+ meaning you can take action on failed ephemeral jobs. [#3980, Benjamin-Dobell]
75
+ - Fix race condition in defining Workers. [#3997, mattbooks]
76
+
77
+ 5.2.2
78
+ ---------
79
+
80
+ - Raise error for duplicate queue names in config to avoid unexpected fetch algorithm change [#3911]
81
+ - Fix concurrency bug on JRuby [#3958, mattbooks]
82
+ - Add "Kill All" button to the retries page [#3938]
83
+
84
+ 5.2.1
85
+ -----------
86
+
87
+ - Fix concurrent modification error during heartbeat [#3921]
88
+
89
+ 5.2.0
90
+ -----------
91
+
92
+ - **Decrease default concurrency from 25 to 10** [#3892]
93
+ - Verify connection pool sizing upon startup [#3917]
94
+ - Smoother scheduling for large Sidekiq clusters [#3889]
95
+ - Switch Sidekiq::Testing impl from alias\_method to Module#prepend, for resiliency [#3852]
96
+ - Update Sidekiq APIs to use SCAN for scalability [#3848, ffiller]
97
+ - Remove concurrent-ruby gem dependency [#3830]
98
+ - Optimize Web UI's bootstrap.css [#3914]
99
+
100
+ 5.1.3
101
+ -----------
102
+
103
+ - Fix version comparison so Ruby 2.2.10 works. [#3808, nateberkopec]
104
+
105
+ 5.1.2
106
+ -----------
107
+
108
+ - Add link to docs in Web UI footer
109
+ - Fix crash on Ctrl-C in Windows [#3775, Bernica]
110
+ - Remove `freeze` calls on String constants. This is superfluous with Ruby
111
+ 2.3+ and `frozen_string_literal: true`. [#3759]
112
+ - Fix use of AR middleware outside of Rails [#3787]
113
+ - Sidekiq::Worker `sidekiq_retry_in` block can now return nil or 0 to use
114
+ the default backoff delay [#3796, dsalahutdinov]
115
+
116
+ 5.1.1
117
+ -----------
118
+
119
+ - Fix Web UI incompatibility with Redis 3.x gem [#3749]
120
+
121
+ 5.1.0
122
+ -----------
123
+
124
+ - **NEW** Global death handlers - called when your job exhausts all
125
+ retries and dies. Now you can take action when a job fails permanently. [#3721]
126
+ - **NEW** Enable ActiveRecord query cache within jobs by default [#3718, sobrinho]
127
+ This will prevent duplicate SELECTS; cache is cleared upon any UPDATE/INSERT/DELETE.
128
+ See the issue for how to bypass the cache or disable it completely.
129
+ - Scheduler timing is now more accurate, 15 -> 5 seconds [#3734]
130
+ - Exceptions during the :startup event will now kill the process [#3717]
131
+ - Make `Sidekiq::Client.via` reentrant [#3715]
132
+ - Fix use of Sidekiq logger outside of the server process [#3714]
133
+ - Tweak `constantize` to better match Rails class lookup. [#3701, caffeinated-tech]
134
+
135
+ 5.0.5
136
+ -----------
137
+
138
+ - Update gemspec to allow newer versions of the Redis gem [#3617]
139
+ - Refactor Worker.set so it can be memoized [#3602]
140
+ - Fix display of Redis URL in web footer, broken in 5.0.3 [#3560]
141
+ - Update `Sidekiq::Job#display_args` to avoid mutation [#3621]
142
+
143
+ 5.0.4
144
+ -----------
145
+
146
+ - Fix "slow startup" performance regression from 5.0.2. [#3525]
147
+ - Allow users to disable ID generation since some redis providers disable the CLIENT command. [#3521]
148
+
149
+ 5.0.3
150
+ -----------
151
+
152
+ - Fix overriding `class_attribute` core extension from ActiveSupport with Sidekiq one [PikachuEXE, #3499]
153
+ - Allow job logger to be overridden [AlfonsoUceda, #3502]
154
+ - Set a default Redis client identifier for debugging [#3516]
155
+ - Fix "Uninitialized constant" errors on startup with the delayed extensions [#3509]
156
+
157
+ 5.0.2
158
+ -----------
159
+
160
+ - fix broken release, thanks @nateberkopec
161
+
162
+ 5.0.1
163
+ -----------
164
+
165
+ - Fix incorrect server identity when daemonizing [jwilm, #3496]
166
+ - Work around error running Web UI against Redis Cluster [#3492]
167
+ - Remove core extensions, Sidekiq is now monkeypatch-free! [#3474]
168
+ - Reimplement Web UI's HTTP\_ACCEPT\_LANGUAGE parsing because the spec is utterly
169
+ incomprehensible for various edge cases. [johanlunds, natematykiewicz, #3449]
170
+ - Update `class_attribute` core extension to avoid warnings
171
+ - Expose `job_hash_context` from `Sidekiq::Logging` to support log customization
172
+
5
173
  5.0.0
6
174
  -----------
7
175
 
@@ -11,7 +179,7 @@
11
179
  commonly used public APIs so this shouldn't impact most users.
12
180
  ```
13
181
  Sidekiq::Middleware::Server::RetryJobs -> Sidekiq::JobRetry
14
- Sidekiq::Middleware::Server::Logging -> Sidekiq::JobLogging
182
+ Sidekiq::Middleware::Server::Logging -> Sidekiq::JobLogger
15
183
  ```
16
184
  - Quieting Sidekiq is now done via the TSTP signal, the USR1 signal is deprecated.
17
185
  - The `delay` extension APIs are no longer available by default, you
@@ -0,0 +1,37 @@
1
+ # Welcome to Sidekiq Enterprise 2.0!
2
+
3
+ Sidekiq Enterprise 2.0 adds a few new features and adds the requirement that license
4
+ credentials be available at runtime. Note that Sidekiq 6.0 does have major breaking changes.
5
+
6
+ ## What's New
7
+
8
+ * Sidekiq Enterprise now requires license credentials at runtime. If you
9
+ configured Bundler as described in the access email you need do
10
+ nothing, everything should just work. If you are vendoring Sidekiq
11
+ Enterprise you will need to configure Bundler also or set
12
+ `SIDEKIQ_ENT_USERNAME=abcdef12 bundle exec sidekiq...` when starting the
13
+ process. [#4232]
14
+ * Dead jobs now release any unique locks they were holding when they died [#4162]
15
+ * Backoff can now be customized per rate limiter by passing in a Proc [#4219]
16
+ ```ruby
17
+ limiter = Sidekiq::Limiter.bucket(:stripe, 10, :second, backoff: ->(limiter, job) {
18
+ return job['overrated'] || 5 # wait for N seconds, where N is the number of
19
+ # times we've failed the rate limit
20
+ })
21
+ ```
22
+ * Removed deprecated APIs and warnings.
23
+ * Various changes for Sidekiq 6.0
24
+ * Requires Ruby 2.5+ and Redis 4.0+
25
+ * Requires Sidekiq 6.0+ and Sidekiq Pro 5.0+
26
+
27
+ ## Upgrade
28
+
29
+ * Upgrade to the latest Sidekiq Enterprise 1.x.
30
+ ```ruby
31
+ gem 'sidekiq-ent', '< 2'
32
+ ```
33
+ * Fix any deprecation warnings you see.
34
+ * Upgrade to 2.x.
35
+ ```ruby
36
+ gem 'sidekiq-ent', '< 3'
37
+ ```