sidekiq 5.2.1 → 6.0.7

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 (86) hide show
  1. checksums.yaml +5 -5
  2. data/.circleci/config.yml +60 -0
  3. data/.gitignore +1 -1
  4. data/.standard.yml +20 -0
  5. data/6.0-Upgrade.md +72 -0
  6. data/COMM-LICENSE +11 -9
  7. data/Changes.md +209 -0
  8. data/Ent-2.0-Upgrade.md +37 -0
  9. data/Ent-Changes.md +36 -1
  10. data/Gemfile +19 -9
  11. data/Gemfile.lock +208 -0
  12. data/Pro-5.0-Upgrade.md +25 -0
  13. data/Pro-Changes.md +44 -1
  14. data/README.md +19 -31
  15. data/Rakefile +6 -4
  16. data/bin/sidekiq +19 -0
  17. data/bin/sidekiqload +33 -25
  18. data/bin/sidekiqmon +8 -0
  19. data/lib/generators/sidekiq/templates/worker_test.rb.erb +1 -1
  20. data/lib/generators/sidekiq/worker_generator.rb +21 -13
  21. data/lib/sidekiq/api.rb +240 -214
  22. data/lib/sidekiq/cli.rb +167 -219
  23. data/lib/sidekiq/client.rb +61 -46
  24. data/lib/sidekiq/delay.rb +5 -6
  25. data/lib/sidekiq/exception_handler.rb +10 -12
  26. data/lib/sidekiq/extensions/action_mailer.rb +10 -20
  27. data/lib/sidekiq/extensions/active_record.rb +9 -7
  28. data/lib/sidekiq/extensions/class_methods.rb +9 -7
  29. data/lib/sidekiq/extensions/generic_proxy.rb +4 -4
  30. data/lib/sidekiq/fetch.rb +11 -12
  31. data/lib/sidekiq/job_logger.rb +47 -9
  32. data/lib/sidekiq/job_retry.rb +79 -58
  33. data/lib/sidekiq/launcher.rb +86 -54
  34. data/lib/sidekiq/logger.rb +165 -0
  35. data/lib/sidekiq/manager.rb +10 -12
  36. data/lib/sidekiq/middleware/chain.rb +14 -4
  37. data/lib/sidekiq/middleware/i18n.rb +5 -7
  38. data/lib/sidekiq/monitor.rb +133 -0
  39. data/lib/sidekiq/paginator.rb +18 -14
  40. data/lib/sidekiq/processor.rb +113 -79
  41. data/lib/sidekiq/rails.rb +24 -29
  42. data/lib/sidekiq/redis_connection.rb +42 -24
  43. data/lib/sidekiq/scheduled.rb +28 -29
  44. data/lib/sidekiq/sd_notify.rb +149 -0
  45. data/lib/sidekiq/systemd.rb +24 -0
  46. data/lib/sidekiq/testing/inline.rb +2 -1
  47. data/lib/sidekiq/testing.rb +34 -23
  48. data/lib/sidekiq/util.rb +17 -16
  49. data/lib/sidekiq/version.rb +2 -1
  50. data/lib/sidekiq/web/action.rb +14 -10
  51. data/lib/sidekiq/web/application.rb +79 -69
  52. data/lib/sidekiq/web/helpers.rb +89 -71
  53. data/lib/sidekiq/web/router.rb +17 -16
  54. data/lib/sidekiq/web.rb +41 -49
  55. data/lib/sidekiq/worker.rb +134 -91
  56. data/lib/sidekiq.rb +69 -44
  57. data/sidekiq.gemspec +16 -18
  58. data/web/assets/javascripts/application.js +22 -19
  59. data/web/assets/javascripts/dashboard.js +16 -25
  60. data/web/assets/stylesheets/application-dark.css +122 -0
  61. data/web/assets/stylesheets/application.css +44 -2
  62. data/web/assets/stylesheets/bootstrap.css +1 -1
  63. data/web/locales/ar.yml +1 -0
  64. data/web/locales/de.yml +14 -2
  65. data/web/locales/en.yml +3 -0
  66. data/web/locales/fr.yml +2 -2
  67. data/web/locales/ja.yml +4 -1
  68. data/web/locales/lt.yml +83 -0
  69. data/web/locales/vi.yml +83 -0
  70. data/web/views/_job_info.erb +2 -1
  71. data/web/views/_nav.erb +3 -17
  72. data/web/views/busy.erb +4 -1
  73. data/web/views/dead.erb +2 -2
  74. data/web/views/layout.erb +1 -0
  75. data/web/views/morgue.erb +4 -1
  76. data/web/views/queue.erb +11 -1
  77. data/web/views/queues.erb +9 -1
  78. data/web/views/retries.erb +8 -1
  79. data/web/views/retry.erb +2 -2
  80. data/web/views/scheduled.erb +4 -1
  81. metadata +37 -27
  82. data/.travis.yml +0 -14
  83. data/bin/sidekiqctl +0 -99
  84. data/lib/sidekiq/core_ext.rb +0 -1
  85. data/lib/sidekiq/logging.rb +0 -122
  86. data/lib/sidekiq/middleware/server/active_record.rb +0 -23
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 2b5307056552014ab284241c16aa83a8d334d31b
4
- data.tar.gz: acc9588810366d8c6dbb03d3c5cbe140a169f501
2
+ SHA256:
3
+ metadata.gz: 3dd5d7a0dd8a7d877484df4ae3b9988f15e9cc4bc0bb4da23224be0049fa733e
4
+ data.tar.gz: e2b7ddb4c045817837e996356851648bf32108b37fa1abcfb72795a185b4a238
5
5
  SHA512:
6
- metadata.gz: 8b051912f610e763585e847a991cee6e684d4b27111f91cfe395a1e02539424e931f5ba16141e30a06c3dcf9de3c54db578be47a9fcd629222b81d8295f7c12a
7
- data.tar.gz: 836cc95385406201ad9e26363698d838381ef993e75034bfc030c4ef0d2821c80e3a4612c5a7ec8bfca1d7acdadd02bcf29f5b979d56ece6752686f6293216ef
6
+ metadata.gz: 5ce3f911b835b38ce212309bcdf81b4789e24a12898a0f2071b9adb9cbcdfa23a33bb7216c2f7c6dcab26d484f79a1271594d3218f63ed041f0027deab5a26f3
7
+ data.tar.gz: 685a6890a43c990b2fd9709c49f9c82c96a487cdcf6fc0607ab15b9dbb47d52c9f797ec5094d3f92ec35c5737e661f966a6b81006ee4b7d99a7f31285180b3db
@@ -0,0 +1,60 @@
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"
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
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.2)
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,215 @@
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.7
6
+ ---------
7
+
8
+ - Refactor systemd integration to work better with custom binaries [#4511]
9
+ - Don't connect to Redis at process exit if not needed [#4502]
10
+ - Remove Redis connection naming [#4479]
11
+ - Fix Redis Sentinel password redaction [#4499]
12
+ - Add Vietnamese locale (vi) [#4528]
13
+
14
+ 6.0.6
15
+ ---------
16
+
17
+ - **Integrate with systemd's watchdog and notification features** [#4488]
18
+ Set `Type=notify` in [sidekiq.service](https://github.com/mperham/sidekiq/blob/4b8a8bd3ae42f6e48ae1fdaf95ed7d7af18ed8bb/examples/systemd/sidekiq.service#L30-L39). The integration works automatically.
19
+ - Use `setTimeout` rather than `setInterval` to avoid thundering herd [#4480]
20
+ - Fix edge case where a job can be pushed without a queue.
21
+ - Flush job stats at exit [#4498]
22
+ - Check RAILS_ENV before RACK_ENV [#4493]
23
+ - Add Lithuanian locale [#4476]
24
+
25
+ 6.0.5
26
+ ---------
27
+
28
+ - Fix broken Web UI response when using NewRelic and Rack 2.1.2+. [#4440]
29
+ - Update APIs to use `UNLINK`, not `DEL`. [#4449]
30
+ - Fix Ruby 2.7 warnings [#4412]
31
+ - Add support for `APP_ENV` [[95fa5d9]](https://github.com/mperham/sidekiq/commit/95fa5d90192148026e52ca2902f1b83c70858ce8)
32
+
33
+ 6.0.4
34
+ ---------
35
+
36
+ - Fix ActiveJob's `sidekiq_options` integration [#4404]
37
+ - Sidekiq Pro users will now see a Pause button next to each queue in
38
+ the Web UI, allowing them to pause queues manually [#4374, shayonj]
39
+ - Fix Sidekiq::Workers API unintentional change in 6.0.2 [#4387]
40
+
41
+
42
+ 6.0.3
43
+ ---------
44
+
45
+ - Fix `Sidekiq::Client.push_bulk` API which was erroneously putting
46
+ invalid `at` values in the job payloads [#4321]
47
+
48
+ 6.0.2
49
+ ---------
50
+
51
+ - Fix Sidekiq Enterprise's rolling restart functionality, broken by refactoring in 6.0.0. [#4334]
52
+ - More internal refactoring and performance tuning [fatkodima]
53
+
54
+ 6.0.1
55
+ ---------
56
+
57
+ - **Performance tuning**, Sidekiq should be 10-15% faster now [#4303, 4299,
58
+ 4269, fatkodima]
59
+ - **Dark Mode support in Web UI** (further design polish welcome!) [#4227, mperham,
60
+ fatkodima, silent-e]
61
+ - **Job-specific log levels**, allowing you to turn on debugging for
62
+ problematic workers. [fatkodima, #4287]
63
+ ```ruby
64
+ MyWorker.set(log_level: :debug).perform_async(...)
65
+ ```
66
+ - **Ad-hoc job tags**. You can tag your jobs with, e.g, subdomain, tenant, country,
67
+ locale, application, version, user/client, "alpha/beta/pro/ent", types of jobs,
68
+ teams/people responsible for jobs, additional metadata, etc.
69
+ Tags are shown on different pages with job listings. Sidekiq Pro users
70
+ can filter based on them [fatkodima, #4280]
71
+ ```ruby
72
+ class MyWorker
73
+ include Sidekiq::Worker
74
+ sidekiq_options tags: ['bank-ops', 'alpha']
75
+ ...
76
+ end
77
+ ```
78
+ - Fetch scheduled jobs in batches before pushing into specific queues.
79
+ This will decrease enqueueing time of scheduled jobs by a third. [fatkodima, #4273]
80
+ ```
81
+ ScheduledSet with 10,000 jobs
82
+ Before: 56.6 seconds
83
+ After: 39.2 seconds
84
+ ```
85
+ - Compress error backtraces before pushing into Redis, if you are
86
+ storing error backtraces, this will halve the size of your RetrySet
87
+ in Redis [fatkodima, #4272]
88
+ ```
89
+ RetrySet with 100,000 jobs
90
+ Before: 261 MB
91
+ After: 129 MB
92
+ ```
93
+ - Support display of ActiveJob 6.0 payloads in the Web UI [#4263]
94
+ - Add `SortedSet#scan` for pattern based scanning. For large sets this API will be **MUCH** faster
95
+ than standard iteration using each. [fatkodima, #4262]
96
+ ```ruby
97
+ Sidekiq::DeadSet.new.scan("UnreliableApi") do |job|
98
+ job.retry
99
+ end
100
+ ```
101
+ - Dramatically speed up SortedSet#find\_job(jid) by using Redis's ZSCAN
102
+ support, approx 10x faster. [fatkodima, #4259]
103
+ ```
104
+ zscan 0.179366 0.047727 0.227093 ( 1.161376)
105
+ enum 8.522311 0.419826 8.942137 ( 9.785079)
106
+ ```
107
+ - Respect rails' generators `test_framework` option and gracefully handle extra `worker` suffix on generator [fatkodima, #4256]
108
+ - Add ability to sort 'Enqueued' page on Web UI by position in the queue [fatkodima, #4248]
109
+ - Support `Client.push_bulk` with different delays [fatkodima, #4243]
110
+ ```ruby
111
+ Sidekiq::Client.push_bulk("class" => FooJob, "args" => [[1], [2]], "at" => [1.minute.from_now.to_f, 5.minutes.from_now.to_f])
112
+ ```
113
+ - Easier way to test enqueuing specific ActionMailer and ActiveRecord delayed jobs. Instead of manually
114
+ parsing embedded class, you can now test by fetching jobs for specific classes. [fatkodima, #4292]
115
+ ```ruby
116
+ assert_equal 1, Sidekiq::Extensions::DelayedMailer.jobs_for(FooMailer).size
117
+ ```
118
+ - Add `sidekiqmon` to gemspec executables [#4242]
119
+ - Gracefully handle `Sidekiq.logger = nil` [#4240]
120
+ - Inject Sidekiq::LogContext module if user-supplied logger does not include it [#4239]
121
+
122
+ 6.0
123
+ ---------
124
+
125
+ This release has major breaking changes. Read and test carefully in production.
126
+
127
+ - With Rails 6.0.1+, ActiveJobs can now use `sidekiq_options` directly to configure Sidekiq
128
+ features/internals like the retry subsystem. [#4213, pirj]
129
+ ```ruby
130
+ class MyJob < ActiveJob::Base
131
+ queue_as :myqueue
132
+ sidekiq_options retry: 10, backtrace: 20
133
+ def perform(...)
134
+ end
135
+ end
136
+ ```
137
+ - Logging has been redesigned to allow for pluggable log formatters:
138
+ ```ruby
139
+ Sidekiq.configure_server do |config|
140
+ config.log_formatter = Sidekiq::Logger::Formatters::JSON.new
141
+ end
142
+ ```
143
+ See the [Logging wiki page](https://github.com/mperham/sidekiq/wiki/Logging) for more details.
144
+ - **BREAKING CHANGE** Validate proper usage of the `REDIS_PROVIDER`
145
+ variable. This variable is meant to hold the name of the environment
146
+ variable which contains your Redis URL, so that you can switch Redis
147
+ providers quickly and easily with a single variable change. It is not
148
+ meant to hold the actual Redis URL itself. If you want to manually set
149
+ the Redis URL (not recommended as it implies you have no failover),
150
+ then you may set `REDIS_URL` directly. [#3969]
151
+ - **BREAKING CHANGE** Increase default shutdown timeout from 8 seconds
152
+ to 25 seconds. Both Heroku and ECS now use 30 second shutdown timeout
153
+ by default and we want Sidekiq to take advantage of this time. If you
154
+ have deployment scripts which depend on the old default timeout, use `-t 8` to
155
+ get the old behavior. [#3968]
156
+ - **BREAKING CHANGE** Remove the daemonization, logfile and pidfile
157
+ arguments to Sidekiq. Use a proper process supervisor (e.g. systemd or
158
+ foreman) to manage Sidekiq. See the Deployment wiki page for links to
159
+ more resources.
160
+ - Integrate the StandardRB code formatter to ensure consistent code
161
+ styling. [#4114, gearnode]
162
+
163
+ 5.2.8
164
+ ---------
165
+
166
+ - Lock to Rack 2.0.x to prevent future incompatibilities
167
+ - Fix invalid reference in `sidekiqctl`
168
+
169
+ 5.2.7
170
+ ---------
171
+
172
+ - Fix stale `enqueued_at` when retrying [#4149]
173
+ - Move build to [Circle CI](https://circleci.com/gh/mperham/sidekiq) [#4120]
174
+
175
+ 5.2.6
176
+ ---------
177
+
178
+ - Fix edge case where a job failure during Redis outage could result in a lost job [#4141]
179
+ - Better handling of malformed job arguments in payload [#4095]
180
+ - Restore bootstap's dropdown css component [#4099, urkle]
181
+ - Display human-friendly time diff for longer queue latencies [#4111, interlinked]
182
+ - Allow `Sidekiq::Worker#set` to be chained
183
+
184
+ 5.2.5
185
+ ---------
186
+
187
+ - Fix default usage of `config/sidekiq.yml` [#4077, Tensho]
188
+
189
+ 5.2.4
190
+ ---------
191
+
192
+ - Add warnings for various deprecations and changes coming in Sidekiq 6.0.
193
+ See the 6-0 branch. [#4056]
194
+ - Various improvements to the Sidekiq test suite and coverage [#4026, #4039, Tensho]
195
+
196
+ 5.2.3
197
+ ---------
198
+
199
+ - Warning message on invalid REDIS\_PROVIDER [#3970]
200
+ - Add `sidekiqctl status` command [#4003, dzunk]
201
+ - Update elapsed time calculatons to use monotonic clock [#3999]
202
+ - Fix a few issues with mobile Web UI styling [#3973, navied]
203
+ - Jobs with `retry: false` now go through the global `death_handlers`,
204
+ meaning you can take action on failed ephemeral jobs. [#3980, Benjamin-Dobell]
205
+ - Fix race condition in defining Workers. [#3997, mattbooks]
206
+
207
+ 5.2.2
208
+ ---------
209
+
210
+ - Raise error for duplicate queue names in config to avoid unexpected fetch algorithm change [#3911]
211
+ - Fix concurrency bug on JRuby [#3958, mattbooks]
212
+ - Add "Kill All" button to the retries page [#3938]
213
+
5
214
  5.2.1
6
215
  -----------
7
216
 
@@ -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,9 +4,44 @@
4
4
 
5
5
  Please see [http://sidekiq.org/](http://sidekiq.org/) for more details and how to buy.
6
6
 
7
- HEAD
7
+ 2.0.1
8
8
  -------------
9
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](https://github.com/mperham/sidekiq/issues/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
+
38
+ 1.7.2
39
+ -------------
40
+
41
+ - Add PT and JA translations
42
+ - Fix elapsed time calculations to use monotonic clock [#4000, sj26]
43
+ - Fix edge case where flapping leadership would cause old periodic
44
+ jobs to be fired once [#3974]
10
45
  - Add support for sidekiqswarm memory monitoring on FreeBSD [#3884]
11
46
 
12
47
  1.7.1
data/Gemfile CHANGED
@@ -1,14 +1,24 @@
1
- source 'https://rubygems.org'
1
+ source "https://rubygems.org"
2
+
2
3
  gemspec
3
4
 
4
- # load testing
5
- #gem "hiredis"
6
- #gem 'toxiproxy'
5
+ gem "rake"
6
+ gem "redis-namespace"
7
+ gem "rails", ">= 6.0.2"
8
+ gem "sqlite3", platforms: :ruby
9
+ gem "activerecord-jdbcsqlite3-adapter", platforms: :jruby
7
10
 
8
11
  group :test do
9
- gem 'rails', '>= 5.0.1'
10
- gem 'minitest'
11
- gem 'rake'
12
- gem 'redis-namespace'
13
- gem 'simplecov'
12
+ gem "minitest"
13
+ gem "simplecov"
14
+ end
15
+
16
+ group :development, :test do
17
+ gem "pry-byebug", platforms: :mri
18
+ gem "standard"
19
+ end
20
+
21
+ group :load_test do
22
+ gem "hiredis"
23
+ gem "toxiproxy"
14
24
  end