sidekiq 5.2.5 → 6.0.3

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 +4 -4
  2. data/.circleci/config.yml +82 -0
  3. data/.gitignore +0 -2
  4. data/.standard.yml +20 -0
  5. data/6.0-Upgrade.md +72 -0
  6. data/COMM-LICENSE +11 -9
  7. data/Changes.md +136 -0
  8. data/Ent-2.0-Upgrade.md +37 -0
  9. data/Ent-Changes.md +32 -1
  10. data/Gemfile +12 -17
  11. data/Gemfile.lock +196 -0
  12. data/Pro-5.0-Upgrade.md +25 -0
  13. data/Pro-Changes.md +26 -2
  14. data/README.md +19 -31
  15. data/Rakefile +5 -4
  16. data/bin/sidekiqload +33 -25
  17. data/bin/sidekiqmon +8 -0
  18. data/lib/generators/sidekiq/templates/worker_test.rb.erb +1 -1
  19. data/lib/generators/sidekiq/worker_generator.rb +20 -12
  20. data/lib/sidekiq/api.rb +230 -214
  21. data/lib/sidekiq/cli.rb +111 -174
  22. data/lib/sidekiq/client.rb +55 -46
  23. data/lib/sidekiq/delay.rb +5 -6
  24. data/lib/sidekiq/exception_handler.rb +10 -12
  25. data/lib/sidekiq/extensions/action_mailer.rb +10 -20
  26. data/lib/sidekiq/extensions/active_record.rb +9 -7
  27. data/lib/sidekiq/extensions/class_methods.rb +9 -7
  28. data/lib/sidekiq/extensions/generic_proxy.rb +4 -4
  29. data/lib/sidekiq/fetch.rb +11 -12
  30. data/lib/sidekiq/job_logger.rb +45 -7
  31. data/lib/sidekiq/job_retry.rb +71 -60
  32. data/lib/sidekiq/launcher.rb +57 -51
  33. data/lib/sidekiq/logger.rb +165 -0
  34. data/lib/sidekiq/manager.rb +7 -9
  35. data/lib/sidekiq/middleware/chain.rb +14 -4
  36. data/lib/sidekiq/middleware/i18n.rb +5 -7
  37. data/lib/sidekiq/monitor.rb +133 -0
  38. data/lib/sidekiq/paginator.rb +18 -14
  39. data/lib/sidekiq/processor.rb +83 -75
  40. data/lib/sidekiq/rails.rb +23 -29
  41. data/lib/sidekiq/redis_connection.rb +31 -37
  42. data/lib/sidekiq/scheduled.rb +28 -29
  43. data/lib/sidekiq/testing/inline.rb +2 -1
  44. data/lib/sidekiq/testing.rb +34 -23
  45. data/lib/sidekiq/util.rb +17 -16
  46. data/lib/sidekiq/version.rb +2 -1
  47. data/lib/sidekiq/web/action.rb +14 -10
  48. data/lib/sidekiq/web/application.rb +64 -66
  49. data/lib/sidekiq/web/helpers.rb +89 -71
  50. data/lib/sidekiq/web/router.rb +17 -14
  51. data/lib/sidekiq/web.rb +41 -49
  52. data/lib/sidekiq/worker.rb +129 -97
  53. data/lib/sidekiq.rb +61 -42
  54. data/sidekiq.gemspec +16 -16
  55. data/web/assets/javascripts/dashboard.js +4 -23
  56. data/web/assets/stylesheets/application-dark.css +125 -0
  57. data/web/assets/stylesheets/application.css +9 -0
  58. data/web/assets/stylesheets/bootstrap.css +1 -1
  59. data/web/locales/de.yml +14 -2
  60. data/web/locales/ja.yml +2 -1
  61. data/web/views/_job_info.erb +2 -1
  62. data/web/views/busy.erb +4 -1
  63. data/web/views/dead.erb +2 -2
  64. data/web/views/layout.erb +1 -0
  65. data/web/views/morgue.erb +4 -1
  66. data/web/views/queue.erb +10 -1
  67. data/web/views/queues.erb +1 -1
  68. data/web/views/retries.erb +4 -1
  69. data/web/views/retry.erb +2 -2
  70. data/web/views/scheduled.erb +4 -1
  71. metadata +21 -32
  72. data/.travis.yml +0 -17
  73. data/Appraisals +0 -9
  74. data/bin/sidekiqctl +0 -237
  75. data/gemfiles/rails_4.gemfile +0 -31
  76. data/gemfiles/rails_5.gemfile +0 -31
  77. data/lib/sidekiq/core_ext.rb +0 -1
  78. data/lib/sidekiq/logging.rb +0 -122
  79. data/lib/sidekiq/middleware/server/active_record.rb +0 -23
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e05ebe69a6d3d12f50f741e147e413b78dbc24038f8a22bf5bbdff8cd4a1f1a0
4
- data.tar.gz: 45b1a5cdc5bc79fbe35599d6e5942c21590fea0b88d9b5adc8ae3ddc767f65eb
3
+ metadata.gz: 289abeb95ea2defd87dce17b31747cc56193a3e606e7f1f87d9ab237706526cc
4
+ data.tar.gz: a9ee206b90eb90737d587da3033559f96150aaceda8b0d319fcca29a08507c56
5
5
  SHA512:
6
- metadata.gz: f582228b5f93aae8c5ba2cc9297f235d420e15fa04cfcffafd60852274e685a1a75809e6f8b24ab00f0ce375faa718fc68d37cb866bd21f291ca11319c895dfe
7
- data.tar.gz: fd5790b633e36125a9cdcf3850e6dc9b87872b47899bd3375b89cdf13197951948b1586ba96b0a051f4cb34b8f28d93a3121cd747d01820a14b2ad6192fd89df
6
+ metadata.gz: b9feed82f74bad9ae58674c373286522df5c2198ec4f685a777fc8ad2dd89f4f985dcfc81a1f915e77ae806e3fab060f5e662fd8378a4efc951da6b230ae3cd4
7
+ data.tar.gz: 1928083cc83adc9a248f6b9f9a5cd95c91b6a4a5c324cb38d4082309cf801031ac2f644a9f1aef3d7c49424dd4525da870af72e892f983c35cb07e4a214aa311
@@ -0,0 +1,82 @@
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
+ environment:
36
+ COVERAGE: true
37
+ CC_TEST_REPORTER_ID: 003c3033501d70a2653bd887ff9a8b2884a263e6a4e27f2ba68748e15530918d
38
+ docker:
39
+ - image: circleci/ruby:2.6
40
+ - image: circleci/redis:4.0
41
+ steps:
42
+ - checkout
43
+ - <<: *restore
44
+ - <<: *bundle
45
+ - <<: *save
46
+
47
+ - run:
48
+ name: Setup Code Climate test-reporter
49
+ command: |
50
+ # download test reporter as a static binary
51
+ curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
52
+ chmod +x ./cc-test-reporter
53
+
54
+ - run:
55
+ name: Code Climate before-build
56
+ command: |
57
+ ./cc-test-reporter before-build
58
+
59
+ - <<: *unit
60
+
61
+ - run:
62
+ name: Report code coverage to Code Climate
63
+ command: |
64
+ ./cc-test-reporter after-build -t simplecov --exit-code $?
65
+ "jruby":
66
+ docker:
67
+ - image: circleci/jruby:latest
68
+ - image: circleci/redis:4.0
69
+ steps:
70
+ - checkout
71
+ - <<: *restore
72
+ - <<: *bundle
73
+ - <<: *save
74
+ - <<: *unit
75
+
76
+ workflows:
77
+ version: 2
78
+ build:
79
+ jobs:
80
+ - "ruby-2.5"
81
+ - "ruby-2.6"
82
+ - "jruby"
data/.gitignore CHANGED
@@ -1,8 +1,6 @@
1
1
  .rvmrc
2
2
  .ruby-version
3
3
  tags
4
- Gemfile.lock
5
- gemfiles/*.lock
6
4
  *.swp
7
5
  dump.rdb
8
6
  .rbx
data/.standard.yml ADDED
@@ -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
data/6.0-Upgrade.md ADDED
@@ -0,0 +1,72 @@
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
+ (requires Rails 6.0.1)
14
+ ```ruby
15
+ class MyJob < ActiveJob::Base
16
+ queue_as :myqueue
17
+ sidekiq_options retry: 10, backtrace: 20
18
+ def perform(...)
19
+ end
20
+ end
21
+ ```
22
+ - Logging has been redesigned to allow pluggable formatters and several
23
+ formats ship with Sidekiq:
24
+ * default - your typical output on macOS
25
+ * heroku - enabled specifically when running in Heroku
26
+ * json - a JSON format for search indexing, one hash per line
27
+
28
+ Sidekiq will enable the best formatter for the detected environment but
29
+ you can override it by configuring the log formatter explicitly. See
30
+ 'sidekiq/logger' for implementation details.
31
+
32
+ ```ruby
33
+ Sidekiq.configure_server do |config|
34
+ config.log_formatter = AcmeCorp::PlainLogFormatter.new
35
+ # config.log_formatter = Sidekiq::Logger::Formatters::JSON.new
36
+ end
37
+ ```
38
+ Please see the [Logging](https://github.com/mperham/sidekiq/wiki/Logging) wiki page for the latest documentation and notes.
39
+ - **Remove the daemonization, logfile and pidfile command line arguments and `sidekiqctl` binary**.
40
+ I've [noted for years](https://www.mikeperham.com/2014/09/22/dont-daemonize-your-daemons/)
41
+ how modern services should be managed with a proper init system.
42
+ Managing services manually is more error-prone, let your operating system do it for you.
43
+ systemd, upstart, and foreman are three options. See the Deployment wiki page for the latest details.
44
+ - **Validate proper usage of the `REDIS_PROVIDER` variable.**
45
+ This variable is meant to hold the name of the environment
46
+ variable which contains your Redis URL, so that you can switch Redis
47
+ providers quickly and easily with a single variable change. It is not
48
+ meant to hold the actual Redis URL itself. If you want to manually set
49
+ the Redis URL then you may set `REDIS_URL` directly. [#3969]
50
+ - **Increase default shutdown timeout from 8 seconds to 25 seconds.**
51
+ Both Heroku and ECS now use 30 second shutdown timeout
52
+ by default and we want Sidekiq to take advantage of this time. If you
53
+ have deployment scripts which depend on the old default timeout, use `-t 8` to
54
+ get the old behavior. [#3968]
55
+ * **Rails <5** is no longer supported. Rails 6+ only works in zeitwerk mode.
56
+ * **Ruby <2.5** is no longer supported.
57
+ * **Redis <4** is no longer supported.
58
+
59
+ ## Upgrade
60
+
61
+ As always, please upgrade Sidekiq **one major version at a time**.
62
+ If you are already running Sidekiq 5.x, then:
63
+
64
+ * Upgrade to the latest Sidekiq 5.x.
65
+ ```ruby
66
+ gem 'sidekiq', '< 6'
67
+ ```
68
+ * Fix any deprecation warnings you see.
69
+ * Upgrade to 6.x.
70
+ ```ruby
71
+ gem 'sidekiq', '< 7'
72
+ ```
data/COMM-LICENSE CHANGED
@@ -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,7 +33,7 @@ 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.
@@ -42,7 +44,7 @@ under the terms of the GNU Lesser General Public License versions 3.0
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,142 @@
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.3
6
+ ---------
7
+
8
+ - Fix `Sidekiq::Client.push_bulk` API which was erroneously putting
9
+ invalid `at` values in the job payloads [#4321]
10
+
11
+ 6.0.2
12
+ ---------
13
+
14
+ - Fix Sidekiq Enterprise's rolling restart functionality, broken by refactoring in 6.0.0. [#4334]
15
+ - More internal refactoring and performance tuning [fatkodima]
16
+
17
+ 6.0.1
18
+ ---------
19
+
20
+ - **Performance tuning**, Sidekiq should be 10-15% faster now [#4303, 4299,
21
+ 4269, fatkodima]
22
+ - **Dark Mode support in Web UI** (further design polish welcome!) [#4227, mperham,
23
+ fatkodima, silent-e]
24
+ - **Job-specific log levels**, allowing you to turn on debugging for
25
+ problematic workers. [fatkodima, #4287]
26
+ ```ruby
27
+ MyWorker.set(log_level: :debug).perform_async(...)
28
+ ```
29
+ - **Ad-hoc job tags**. You can tag your jobs with, e.g, subdomain, tenant, country,
30
+ locale, application, version, user/client, "alpha/beta/pro/ent", types of jobs,
31
+ teams/people responsible for jobs, additional metadata, etc.
32
+ Tags are shown on different pages with job listings. Sidekiq Pro users
33
+ can filter based on them [fatkodima, #4280]
34
+ ```ruby
35
+ class MyWorker
36
+ include Sidekiq::Worker
37
+ sidekiq_options tags: ['bank-ops', 'alpha']
38
+ ...
39
+ end
40
+ ```
41
+ - Fetch scheduled jobs in batches before pushing into specific queues.
42
+ This will decrease enqueueing time of scheduled jobs by a third. [fatkodima, #4273]
43
+ ```
44
+ ScheduledSet with 10,000 jobs
45
+ Before: 56.6 seconds
46
+ After: 39.2 seconds
47
+ ```
48
+ - Compress error backtraces before pushing into Redis, if you are
49
+ storing error backtraces, this will halve the size of your RetrySet
50
+ in Redis [fatkodima, #4272]
51
+ ```
52
+ RetrySet with 100,000 jobs
53
+ Before: 261 MB
54
+ After: 129 MB
55
+ ```
56
+ - Support display of ActiveJob 6.0 payloads in the Web UI [#4263]
57
+ - Add `SortedSet#scan` for pattern based scanning. For large sets this API will be **MUCH** faster
58
+ than standard iteration using each. [fatkodima, #4262]
59
+ ```ruby
60
+ Sidekiq::DeadSet.new.scan("UnreliableApi") do |job|
61
+ job.retry
62
+ end
63
+ ```
64
+ - Dramatically speed up SortedSet#find\_job(jid) by using Redis's ZSCAN
65
+ support, approx 10x faster. [fatkodima, #4259]
66
+ ```
67
+ zscan 0.179366 0.047727 0.227093 ( 1.161376)
68
+ enum 8.522311 0.419826 8.942137 ( 9.785079)
69
+ ```
70
+ - Respect rails' generators `test_framework` option and gracefully handle extra `worker` suffix on generator [fatkodima, #4256]
71
+ - Add ability to sort 'Enqueued' page on Web UI by position in the queue [fatkodima, #4248]
72
+ - Support `Client.push_bulk` with different delays [fatkodima, #4243]
73
+ ```ruby
74
+ Sidekiq::Client.push_bulk("class" => FooJob, "args" => [[1], [2]], "at" => [1.minute.from_now.to_f, 5.minutes.from_now.to_f])
75
+ ```
76
+ - Easier way to test enqueuing specific ActionMailer and ActiveRecord delayed jobs. Instead of manually
77
+ parsing embedded class, you can now test by fetching jobs for specific classes. [fatkodima, #4292]
78
+ ```ruby
79
+ assert_equal 1, Sidekiq::Extensions::DelayedMailer.jobs_for(FooMailer).size
80
+ ```
81
+ - Add `sidekiqmon` to gemspec executables [#4242]
82
+ - Gracefully handle `Sidekiq.logger = nil` [#4240]
83
+ - Inject Sidekiq::LogContext module if user-supplied logger does not include it [#4239]
84
+
85
+ 6.0
86
+ ---------
87
+
88
+ This release has major breaking changes. Read and test carefully in production.
89
+
90
+ - With Rails 6.0.1+, ActiveJobs can now use `sidekiq_options` directly to configure Sidekiq
91
+ features/internals like the retry subsystem. [#4213, pirj]
92
+ ```ruby
93
+ class MyJob < ActiveJob::Base
94
+ queue_as :myqueue
95
+ sidekiq_options retry: 10, backtrace: 20
96
+ def perform(...)
97
+ end
98
+ end
99
+ ```
100
+ - Logging has been redesigned to allow for pluggable log formatters:
101
+ ```ruby
102
+ Sidekiq.configure_server do |config|
103
+ config.log_formatter = Sidekiq::Logger::Formatters::JSON.new
104
+ end
105
+ ```
106
+ See the [Logging wiki page](https://github.com/mperham/sidekiq/wiki/Logging) for more details.
107
+ - **BREAKING CHANGE** Validate proper usage of the `REDIS_PROVIDER`
108
+ variable. This variable is meant to hold the name of the environment
109
+ variable which contains your Redis URL, so that you can switch Redis
110
+ providers quickly and easily with a single variable change. It is not
111
+ meant to hold the actual Redis URL itself. If you want to manually set
112
+ the Redis URL (not recommended as it implies you have no failover),
113
+ then you may set `REDIS_URL` directly. [#3969]
114
+ - **BREAKING CHANGE** Increase default shutdown timeout from 8 seconds
115
+ to 25 seconds. Both Heroku and ECS now use 30 second shutdown timeout
116
+ by default and we want Sidekiq to take advantage of this time. If you
117
+ have deployment scripts which depend on the old default timeout, use `-t 8` to
118
+ get the old behavior. [#3968]
119
+ - **BREAKING CHANGE** Remove the daemonization, logfile and pidfile
120
+ arguments to Sidekiq. Use a proper process supervisor (e.g. systemd or
121
+ foreman) to manage Sidekiq. See the Deployment wiki page for links to
122
+ more resources.
123
+ - Integrate the StandardRB code formatter to ensure consistent code
124
+ styling. [#4114, gearnode]
125
+
126
+ 5.2.7
127
+ ---------
128
+
129
+ - Fix stale `enqueued_at` when retrying [#4149]
130
+ - Move build to [Circle CI](https://circleci.com/gh/mperham/sidekiq) [#4120]
131
+
132
+ 5.2.6
133
+ ---------
134
+
135
+ - Fix edge case where a job failure during Redis outage could result in a lost job [#4141]
136
+ - Better handling of malformed job arguments in payload [#4095]
137
+ - Restore bootstap's dropdown css component [#4099, urkle]
138
+ - Display human-friendly time diff for longer queue latencies [#4111, interlinked]
139
+ - Allow `Sidekiq::Worker#set` to be chained
140
+
5
141
  5.2.5
6
142
  ---------
7
143
 
@@ -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
+ ```
data/Ent-Changes.md CHANGED
@@ -4,10 +4,41 @@
4
4
 
5
5
  Please see [http://sidekiq.org/](http://sidekiq.org/) for more details and how to buy.
6
6
 
7
+ 2.0.1
8
+ -------------
9
+
10
+ - Periodic job registration API adjusted to avoid loading classes in initializer [#4271]
11
+ - Remove support for deprecated ENV variables (COUNT, MAXMEM\_MB, INDEX) in swarm code
12
+
13
+ 2.0.0
14
+ -------------
15
+
16
+ - Except for the [newly required credentials](/mperham/sidekiq/issue/4232), Sidekiq Enterprise 2.0 does
17
+ not have any significant migration steps.
18
+ - Sidekiq Enterprise must now be started with valid license credentials. [#4232]
19
+ - Call `GC.compact` if possible in sidekiqswarm before forking [#4181]
20
+ - Changes for forward-compatibility with Sidekiq 6.0.
21
+ - Add death handler to remove any lingering unique locks [#4162]
22
+ - Backoff can now be customized per rate limiter [#4219]
23
+ - Code formatting changes for StandardRB
24
+
25
+ 1.8.1
26
+ -------------
27
+
28
+ - Fix excessive lock reclaims with concurrent limiter [#4105]
29
+ - Add ES translations, see issues [#3949](https://github.com/mperham/sidekiq/issues/3949) and [#3951](https://github.com/mperham/sidekiq/issues/3951) to add your own language.
30
+
31
+ 1.8.0
32
+ -------------
33
+
34
+ - Require Sidekiq Pro 4.0 and Sidekiq 5.2.
35
+ - Refactor historical metrics API to use revamped Statsd support in Sidekiq Pro
36
+ - Add a gauge to historical metrics for `default` queue latency [#4079]
37
+
7
38
  1.7.2
8
39
  -------------
9
40
 
10
- - Add PT and JA translations, see issues [#3949](https://github.com/mperham/sidekiq/issues/3949) and [#3951](https://github.com/mperham/sidekiq/issues/3951) to add your own language.
41
+ - Add PT and JA translations
11
42
  - Fix elapsed time calculations to use monotonic clock [#4000, sj26]
12
43
  - Fix edge case where flapping leadership would cause old periodic
13
44
  jobs to be fired once [#3974]
data/Gemfile CHANGED
@@ -1,29 +1,24 @@
1
- source 'https://rubygems.org'
1
+ source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
4
 
5
- gem 'rake'
6
- gem 'redis-namespace'
7
- gem 'rails', '~> 5.2'
8
- gem 'sqlite3', platforms: :ruby
9
- gem 'activerecord-jdbcsqlite3-adapter', platforms: :jruby
10
-
11
- group :development do
12
- gem 'appraisal'
13
- end
5
+ gem "rake"
6
+ gem "redis-namespace"
7
+ gem "rails"
8
+ gem "sqlite3", platforms: :ruby
9
+ gem "activerecord-jdbcsqlite3-adapter", platforms: :jruby
14
10
 
15
11
  group :test do
16
- gem 'minitest'
17
- gem 'minitest-focus'
18
- gem 'minitest-reporters'
19
- gem 'simplecov'
12
+ gem "minitest"
13
+ gem "simplecov"
20
14
  end
21
15
 
22
16
  group :development, :test do
23
- gem 'pry-byebug', platforms: :mri
17
+ gem "pry-byebug", platforms: :mri
18
+ gem "standard"
24
19
  end
25
20
 
26
21
  group :load_test do
27
- gem 'hiredis'
28
- gem 'toxiproxy'
22
+ gem "hiredis"
23
+ gem "toxiproxy"
29
24
  end