sidekiq 4.2.10 → 6.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. checksums.yaml +5 -5
  2. data/.github/ISSUE_TEMPLATE/bug_report.md +20 -0
  3. data/.github/workflows/ci.yml +41 -0
  4. data/.gitignore +2 -1
  5. data/.standard.yml +20 -0
  6. data/5.0-Upgrade.md +56 -0
  7. data/6.0-Upgrade.md +72 -0
  8. data/COMM-LICENSE +12 -10
  9. data/Changes.md +354 -1
  10. data/Ent-2.0-Upgrade.md +37 -0
  11. data/Ent-Changes.md +111 -3
  12. data/Gemfile +16 -21
  13. data/Gemfile.lock +192 -0
  14. data/LICENSE +1 -1
  15. data/Pro-4.0-Upgrade.md +35 -0
  16. data/Pro-5.0-Upgrade.md +25 -0
  17. data/Pro-Changes.md +181 -4
  18. data/README.md +19 -33
  19. data/Rakefile +6 -8
  20. data/bin/sidekiq +26 -2
  21. data/bin/sidekiqload +37 -34
  22. data/bin/sidekiqmon +8 -0
  23. data/lib/generators/sidekiq/templates/worker_spec.rb.erb +1 -1
  24. data/lib/generators/sidekiq/templates/worker_test.rb.erb +1 -1
  25. data/lib/generators/sidekiq/worker_generator.rb +21 -13
  26. data/lib/sidekiq.rb +86 -61
  27. data/lib/sidekiq/api.rb +320 -209
  28. data/lib/sidekiq/cli.rb +207 -217
  29. data/lib/sidekiq/client.rb +78 -51
  30. data/lib/sidekiq/delay.rb +41 -0
  31. data/lib/sidekiq/exception_handler.rb +12 -16
  32. data/lib/sidekiq/extensions/action_mailer.rb +13 -22
  33. data/lib/sidekiq/extensions/active_record.rb +13 -10
  34. data/lib/sidekiq/extensions/class_methods.rb +14 -11
  35. data/lib/sidekiq/extensions/generic_proxy.rb +10 -4
  36. data/lib/sidekiq/fetch.rb +29 -30
  37. data/lib/sidekiq/job_logger.rb +63 -0
  38. data/lib/sidekiq/job_retry.rb +262 -0
  39. data/lib/sidekiq/launcher.rb +102 -69
  40. data/lib/sidekiq/logger.rb +165 -0
  41. data/lib/sidekiq/manager.rb +16 -19
  42. data/lib/sidekiq/middleware/chain.rb +15 -5
  43. data/lib/sidekiq/middleware/i18n.rb +5 -7
  44. data/lib/sidekiq/monitor.rb +133 -0
  45. data/lib/sidekiq/paginator.rb +18 -14
  46. data/lib/sidekiq/processor.rb +161 -82
  47. data/lib/sidekiq/rails.rb +27 -100
  48. data/lib/sidekiq/redis_connection.rb +60 -20
  49. data/lib/sidekiq/scheduled.rb +61 -35
  50. data/lib/sidekiq/sd_notify.rb +149 -0
  51. data/lib/sidekiq/systemd.rb +24 -0
  52. data/lib/sidekiq/testing.rb +48 -28
  53. data/lib/sidekiq/testing/inline.rb +2 -1
  54. data/lib/sidekiq/util.rb +20 -16
  55. data/lib/sidekiq/version.rb +2 -1
  56. data/lib/sidekiq/web.rb +57 -57
  57. data/lib/sidekiq/web/action.rb +14 -14
  58. data/lib/sidekiq/web/application.rb +103 -84
  59. data/lib/sidekiq/web/csrf_protection.rb +158 -0
  60. data/lib/sidekiq/web/helpers.rb +126 -71
  61. data/lib/sidekiq/web/router.rb +18 -17
  62. data/lib/sidekiq/worker.rb +164 -41
  63. data/sidekiq.gemspec +15 -27
  64. data/web/assets/javascripts/application.js +25 -27
  65. data/web/assets/javascripts/dashboard.js +33 -37
  66. data/web/assets/stylesheets/application-dark.css +143 -0
  67. data/web/assets/stylesheets/application-rtl.css +246 -0
  68. data/web/assets/stylesheets/application.css +385 -10
  69. data/web/assets/stylesheets/bootstrap-rtl.min.css +9 -0
  70. data/web/assets/stylesheets/bootstrap.css +2 -2
  71. data/web/locales/ar.yml +81 -0
  72. data/web/locales/de.yml +14 -2
  73. data/web/locales/en.yml +4 -0
  74. data/web/locales/es.yml +4 -3
  75. data/web/locales/fa.yml +1 -0
  76. data/web/locales/fr.yml +2 -2
  77. data/web/locales/he.yml +79 -0
  78. data/web/locales/ja.yml +9 -4
  79. data/web/locales/lt.yml +83 -0
  80. data/web/locales/pl.yml +4 -4
  81. data/web/locales/ru.yml +4 -0
  82. data/web/locales/ur.yml +80 -0
  83. data/web/locales/vi.yml +83 -0
  84. data/web/views/_footer.erb +5 -2
  85. data/web/views/_job_info.erb +2 -1
  86. data/web/views/_nav.erb +4 -18
  87. data/web/views/_paging.erb +1 -1
  88. data/web/views/busy.erb +15 -8
  89. data/web/views/dashboard.erb +1 -1
  90. data/web/views/dead.erb +2 -2
  91. data/web/views/layout.erb +12 -2
  92. data/web/views/morgue.erb +9 -6
  93. data/web/views/queue.erb +18 -8
  94. data/web/views/queues.erb +11 -1
  95. data/web/views/retries.erb +14 -7
  96. data/web/views/retry.erb +2 -2
  97. data/web/views/scheduled.erb +7 -4
  98. metadata +41 -188
  99. data/.github/issue_template.md +0 -9
  100. data/.travis.yml +0 -18
  101. data/bin/sidekiqctl +0 -99
  102. data/lib/sidekiq/core_ext.rb +0 -119
  103. data/lib/sidekiq/logging.rb +0 -106
  104. data/lib/sidekiq/middleware/server/active_record.rb +0 -13
  105. data/lib/sidekiq/middleware/server/logging.rb +0 -31
  106. data/lib/sidekiq/middleware/server/retry_jobs.rb +0 -205
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 595500a3810c25e8e04e86c644f966ff01cb035f
4
- data.tar.gz: 3f92a9f61e61848bc2c0639469ce3588f3848fc0
2
+ SHA256:
3
+ metadata.gz: 5a80310735fb458e7332a5ecc86072248e0777e1951f77f14965c06313c5b2f8
4
+ data.tar.gz: bfd09dc57c4506ca9c4d74dd9a38e88ef18700aafaf92814d662c6df4e4b2e5b
5
5
  SHA512:
6
- metadata.gz: c4e97c3665d1e902f47cfb579fda437dc834ac4b584606f1ca3b8fd9225e8502cacf5fb687673b4735b359de6af179589759a34369f1c74e904b37f8fe70a4ee
7
- data.tar.gz: a4e6d41067bf6b88c77577def0c1f9ecc3f5d46f0bdfb0821952c26867e91a71c64231aab09a25096d22c3272dea2dcc37547bc6096dd7622a192fa00e0a4e50
6
+ metadata.gz: c0e416fe575874c2051e88c64a6cbb30ad2ba4929ca33487ca1323b1963101d3d08ed43b8edbe874bccfa677521b0745baf589b451c7c56ff41b7bc70ee4f88d
7
+ data.tar.gz: 4d1cd6d03768f9844bd8edd9bdb545a743084322f4edc01682e04b0990b0fb6aa3f1c6ad4f9a87c1b810a07e03b08eae0405ad2291b42d58eebb257bed7a60f4
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ Ruby version:
11
+ Rails version:
12
+ Sidekiq / Pro / Enterprise version(s):
13
+
14
+ Please include your initializer, sidekiq.yml, and any error message with the full backtrace.
15
+
16
+ If you are using an old version, have you checked the changelogs to see if your issue has been fixed in a later version?
17
+
18
+ https://github.com/mperham/sidekiq/blob/master/Changes.md
19
+ https://github.com/mperham/sidekiq/blob/master/Pro-Changes.md
20
+ https://github.com/mperham/sidekiq/blob/master/Ent-Changes.md
@@ -0,0 +1,41 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
+
9
+ jobs:
10
+ test:
11
+
12
+ runs-on: ubuntu-latest
13
+
14
+ strategy:
15
+ fail-fast: false
16
+ matrix:
17
+ ruby: [2.5, 2.6, 2.7]
18
+ services:
19
+ redis:
20
+ image: redis
21
+ options: >-
22
+ --health-cmd "redis-cli ping"
23
+ --health-interval 10s
24
+ --health-timeout 5s
25
+ --health-retries 5
26
+ ports:
27
+ - 6379:6379
28
+
29
+ steps:
30
+ - uses: actions/checkout@v2
31
+ - name: Set up Ruby
32
+ # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
33
+ # change this to (see https://github.com/ruby/setup-ruby#versioning):
34
+ uses: ruby/setup-ruby@v1
35
+ with:
36
+ bundler-cache: true
37
+ ruby-version: ${{ matrix.ruby }}
38
+ - name: Install dependencies
39
+ run: bundle install
40
+ - name: Run tests
41
+ run: bundle exec rake
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
@@ -10,3 +9,5 @@ vendor/
10
9
  .bundle/
11
10
  .sass-cache/
12
11
  tmp/
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,56 @@
1
+ # Welcome to Sidekiq 5.0!
2
+
3
+ Sidekiq 5.0 contains a reworked job dispatch and execution core to integrate
4
+ better with the new Rails 5.0 Executor. It also drops support for older
5
+ versions of Ruby and Rails and adds support for RTL languages in the Web UI.
6
+
7
+ ## What's New
8
+
9
+ * Integrate job logging and retry logic directly in with the job
10
+ execution logic in Sidekiq::Processor. Previously this logic was
11
+ defined as middleware. In Rails 5.0, ActiveSupport::Executor handles ActiveRecord
12
+ connection management, job callbacks, development mode class loading,
13
+ etc. Because of its extensive responsibilities, the Executor can't be
14
+ integrated as Sidekiq middleware; the logging/retry logic had to be pulled out
15
+ too. Sidekiq 4.2 had a hack to make it work but this redesign provides
16
+ a cleaner integration. [#3235]
17
+ * The Delayed Extensions `delay`, `delay_in` and `delay_until` APIs are
18
+ no longer available by default. The extensions allow you to marshal
19
+ job arguments as YAML, leading to cases where job payloads could be many
20
+ 100s of KB or larger if not careful, leading to Redis networking
21
+ timeouts or other problems. As noted in the Best Practices wiki page,
22
+ Sidekiq is designed for jobs with small, simple arguments.
23
+
24
+ Add this line to your initializer to re-enable them and get the old behavior:
25
+ ```ruby
26
+ Sidekiq::Extensions.enable_delay!
27
+ ```
28
+ The old `Sidekiq.remove_delay!` API has been removed as it is now the default. [#3299]
29
+ * Sidekiq's quiet signal is now `TSTP` (think of it as **T**hread
30
+ **ST**o**P**) instead of USR1 as USR1 is not available on JRuby.
31
+ USR1 will continue to be supported in Sidekiq 5.x for backwards
32
+ compatibility and will be removed in Sidekiq 6.x. [#3302]
33
+ * The Web UI is now bi-directional - it can render either LTR
34
+ (left-to-right) or RTL languages. With this change, **Farsi, Arabic,
35
+ Hebrew and Urdu** are officially supported. [#3381]
36
+ * Jobs which can't be parsed due to invalid JSON are now pushed
37
+ immediately to the Dead set since they require manual intervention and
38
+ will never execute successfully as is. The Web UI has been updated to
39
+ more gracefully display these jobs. [#3296]
40
+ * **Rails 3.2** is no longer supported.
41
+ * **Ruby 2.0 and Ruby 2.1** are no longer supported. Ruby 2.2.2+ is required.
42
+
43
+ ## Upgrade
44
+
45
+ As always, please upgrade Sidekiq **one major version at a time**.
46
+ If you are already running Sidekiq 4.x, then:
47
+
48
+ * Upgrade to the latest Sidekiq 4.x.
49
+ ```ruby
50
+ gem 'sidekiq', '< 5'
51
+ ```
52
+ * Fix any deprecation warnings you see.
53
+ * Upgrade to 5.x.
54
+ ```ruby
55
+ gem 'sidekiq', '< 6'
56
+ ```
@@ -0,0 +1,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
+ ```
@@ -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
@@ -1,6 +1,359 @@
1
1
  # Sidekiq Changes
2
2
 
3
- HEAD
3
+ [Sidekiq Changes](https://github.com/mperham/sidekiq/blob/master/Changes.md) | [Sidekiq Pro Changes](https://github.com/mperham/sidekiq/blob/master/Pro-Changes.md) | [Sidekiq Enterprise Changes](https://github.com/mperham/sidekiq/blob/master/Ent-Changes.md)
4
+
5
+ 6.1.2
6
+ ---------
7
+
8
+ - Improve readability in dark mode Web UI [#4674]
9
+ - Fix Web UI crash with corrupt session [#4672]
10
+ - Allow middleware to yield arguments [#4673, @eugeneius]
11
+ - Migrate CI from CircleCI to GitHub Actions [#4677]
12
+
13
+ 6.1.1
14
+ ---------
15
+
16
+ - Jobs are now sorted by age in the Busy Workers table. [#4641]
17
+ - Fix "check all" JS logic in Web UI [#4619]
18
+
19
+ 6.1.0
20
+ ---------
21
+
22
+ - Web UI - Dark Mode fixes [#4543, natematykiewicz]
23
+ - Ensure `Rack::ContentLength` is loaded as middleware for correct Web UI responses [#4541]
24
+ - Avoid exception dumping SSL store in Redis connection logging [#4532]
25
+ - Better error messages in Sidekiq::Client [#4549]
26
+ - Remove rack-protection, reimplement CSRF protection [#4588]
27
+ - Require redis-rb 4.2 [#4591]
28
+ - Update to jquery 1.12.4 [#4593]
29
+ - Refactor internal fetch logic and API [#4602]
30
+
31
+ 6.0.7
32
+ ---------
33
+
34
+ - Refactor systemd integration to work better with custom binaries [#4511]
35
+ - Don't connect to Redis at process exit if not needed [#4502]
36
+ - Remove Redis connection naming [#4479]
37
+ - Fix Redis Sentinel password redaction [#4499]
38
+ - Add Vietnamese locale (vi) [#4528]
39
+
40
+ 6.0.6
41
+ ---------
42
+
43
+ - **Integrate with systemd's watchdog and notification features** [#4488]
44
+ Set `Type=notify` in [sidekiq.service](https://github.com/mperham/sidekiq/blob/4b8a8bd3ae42f6e48ae1fdaf95ed7d7af18ed8bb/examples/systemd/sidekiq.service#L30-L39). The integration works automatically.
45
+ - Use `setTimeout` rather than `setInterval` to avoid thundering herd [#4480]
46
+ - Fix edge case where a job can be pushed without a queue.
47
+ - Flush job stats at exit [#4498]
48
+ - Check RAILS_ENV before RACK_ENV [#4493]
49
+ - Add Lithuanian locale [#4476]
50
+
51
+ 6.0.5
52
+ ---------
53
+
54
+ - Fix broken Web UI response when using NewRelic and Rack 2.1.2+. [#4440]
55
+ - Update APIs to use `UNLINK`, not `DEL`. [#4449]
56
+ - Fix Ruby 2.7 warnings [#4412]
57
+ - Add support for `APP_ENV` [[95fa5d9]](https://github.com/mperham/sidekiq/commit/95fa5d90192148026e52ca2902f1b83c70858ce8)
58
+
59
+ 6.0.4
60
+ ---------
61
+
62
+ - Fix ActiveJob's `sidekiq_options` integration [#4404]
63
+ - Sidekiq Pro users will now see a Pause button next to each queue in
64
+ the Web UI, allowing them to pause queues manually [#4374, shayonj]
65
+ - Fix Sidekiq::Workers API unintentional change in 6.0.2 [#4387]
66
+
67
+
68
+ 6.0.3
69
+ ---------
70
+
71
+ - Fix `Sidekiq::Client.push_bulk` API which was erroneously putting
72
+ invalid `at` values in the job payloads [#4321]
73
+
74
+ 6.0.2
75
+ ---------
76
+
77
+ - Fix Sidekiq Enterprise's rolling restart functionality, broken by refactoring in 6.0.0. [#4334]
78
+ - More internal refactoring and performance tuning [fatkodima]
79
+
80
+ 6.0.1
81
+ ---------
82
+
83
+ - **Performance tuning**, Sidekiq should be 10-15% faster now [#4303, 4299,
84
+ 4269, fatkodima]
85
+ - **Dark Mode support in Web UI** (further design polish welcome!) [#4227, mperham,
86
+ fatkodima, silent-e]
87
+ - **Job-specific log levels**, allowing you to turn on debugging for
88
+ problematic workers. [fatkodima, #4287]
89
+ ```ruby
90
+ MyWorker.set(log_level: :debug).perform_async(...)
91
+ ```
92
+ - **Ad-hoc job tags**. You can tag your jobs with, e.g, subdomain, tenant, country,
93
+ locale, application, version, user/client, "alpha/beta/pro/ent", types of jobs,
94
+ teams/people responsible for jobs, additional metadata, etc.
95
+ Tags are shown on different pages with job listings. Sidekiq Pro users
96
+ can filter based on them [fatkodima, #4280]
97
+ ```ruby
98
+ class MyWorker
99
+ include Sidekiq::Worker
100
+ sidekiq_options tags: ['bank-ops', 'alpha']
101
+ ...
102
+ end
103
+ ```
104
+ - Fetch scheduled jobs in batches before pushing into specific queues.
105
+ This will decrease enqueueing time of scheduled jobs by a third. [fatkodima, #4273]
106
+ ```
107
+ ScheduledSet with 10,000 jobs
108
+ Before: 56.6 seconds
109
+ After: 39.2 seconds
110
+ ```
111
+ - Compress error backtraces before pushing into Redis, if you are
112
+ storing error backtraces, this will halve the size of your RetrySet
113
+ in Redis [fatkodima, #4272]
114
+ ```
115
+ RetrySet with 100,000 jobs
116
+ Before: 261 MB
117
+ After: 129 MB
118
+ ```
119
+ - Support display of ActiveJob 6.0 payloads in the Web UI [#4263]
120
+ - Add `SortedSet#scan` for pattern based scanning. For large sets this API will be **MUCH** faster
121
+ than standard iteration using each. [fatkodima, #4262]
122
+ ```ruby
123
+ Sidekiq::DeadSet.new.scan("UnreliableApi") do |job|
124
+ job.retry
125
+ end
126
+ ```
127
+ - Dramatically speed up SortedSet#find\_job(jid) by using Redis's ZSCAN
128
+ support, approx 10x faster. [fatkodima, #4259]
129
+ ```
130
+ zscan 0.179366 0.047727 0.227093 ( 1.161376)
131
+ enum 8.522311 0.419826 8.942137 ( 9.785079)
132
+ ```
133
+ - Respect rails' generators `test_framework` option and gracefully handle extra `worker` suffix on generator [fatkodima, #4256]
134
+ - Add ability to sort 'Enqueued' page on Web UI by position in the queue [fatkodima, #4248]
135
+ - Support `Client.push_bulk` with different delays [fatkodima, #4243]
136
+ ```ruby
137
+ Sidekiq::Client.push_bulk("class" => FooJob, "args" => [[1], [2]], "at" => [1.minute.from_now.to_f, 5.minutes.from_now.to_f])
138
+ ```
139
+ - Easier way to test enqueuing specific ActionMailer and ActiveRecord delayed jobs. Instead of manually
140
+ parsing embedded class, you can now test by fetching jobs for specific classes. [fatkodima, #4292]
141
+ ```ruby
142
+ assert_equal 1, Sidekiq::Extensions::DelayedMailer.jobs_for(FooMailer).size
143
+ ```
144
+ - Add `sidekiqmon` to gemspec executables [#4242]
145
+ - Gracefully handle `Sidekiq.logger = nil` [#4240]
146
+ - Inject Sidekiq::LogContext module if user-supplied logger does not include it [#4239]
147
+
148
+ 6.0
149
+ ---------
150
+
151
+ This release has major breaking changes. Read and test carefully in production.
152
+
153
+ - With Rails 6.0.1+, ActiveJobs can now use `sidekiq_options` directly to configure Sidekiq
154
+ features/internals like the retry subsystem. [#4213, pirj]
155
+ ```ruby
156
+ class MyJob < ActiveJob::Base
157
+ queue_as :myqueue
158
+ sidekiq_options retry: 10, backtrace: 20
159
+ def perform(...)
160
+ end
161
+ end
162
+ ```
163
+ - Logging has been redesigned to allow for pluggable log formatters:
164
+ ```ruby
165
+ Sidekiq.configure_server do |config|
166
+ config.log_formatter = Sidekiq::Logger::Formatters::JSON.new
167
+ end
168
+ ```
169
+ See the [Logging wiki page](https://github.com/mperham/sidekiq/wiki/Logging) for more details.
170
+ - **BREAKING CHANGE** Validate proper usage of the `REDIS_PROVIDER`
171
+ variable. This variable is meant to hold the name of the environment
172
+ variable which contains your Redis URL, so that you can switch Redis
173
+ providers quickly and easily with a single variable change. It is not
174
+ meant to hold the actual Redis URL itself. If you want to manually set
175
+ the Redis URL (not recommended as it implies you have no failover),
176
+ then you may set `REDIS_URL` directly. [#3969]
177
+ - **BREAKING CHANGE** Increase default shutdown timeout from 8 seconds
178
+ to 25 seconds. Both Heroku and ECS now use 30 second shutdown timeout
179
+ by default and we want Sidekiq to take advantage of this time. If you
180
+ have deployment scripts which depend on the old default timeout, use `-t 8` to
181
+ get the old behavior. [#3968]
182
+ - **BREAKING CHANGE** Remove the daemonization, logfile and pidfile
183
+ arguments to Sidekiq. Use a proper process supervisor (e.g. systemd or
184
+ foreman) to manage Sidekiq. See the Deployment wiki page for links to
185
+ more resources.
186
+ - Integrate the StandardRB code formatter to ensure consistent code
187
+ styling. [#4114, gearnode]
188
+
189
+ 5.2.9
190
+ ---------
191
+
192
+ - Release Rack lock due to a cascade of CVEs. [#4566]
193
+ Pro-tip: don't lock Rack.
194
+
195
+ 5.2.8
196
+ ---------
197
+
198
+ - Lock to Rack 2.0.x to prevent future incompatibilities
199
+ - Fix invalid reference in `sidekiqctl`
200
+
201
+ 5.2.7
202
+ ---------
203
+
204
+ - Fix stale `enqueued_at` when retrying [#4149]
205
+ - Move build to [Circle CI](https://circleci.com/gh/mperham/sidekiq) [#4120]
206
+
207
+ 5.2.6
208
+ ---------
209
+
210
+ - Fix edge case where a job failure during Redis outage could result in a lost job [#4141]
211
+ - Better handling of malformed job arguments in payload [#4095]
212
+ - Restore bootstap's dropdown css component [#4099, urkle]
213
+ - Display human-friendly time diff for longer queue latencies [#4111, interlinked]
214
+ - Allow `Sidekiq::Worker#set` to be chained
215
+
216
+ 5.2.5
217
+ ---------
218
+
219
+ - Fix default usage of `config/sidekiq.yml` [#4077, Tensho]
220
+
221
+ 5.2.4
222
+ ---------
223
+
224
+ - Add warnings for various deprecations and changes coming in Sidekiq 6.0.
225
+ See the 6-0 branch. [#4056]
226
+ - Various improvements to the Sidekiq test suite and coverage [#4026, #4039, Tensho]
227
+
228
+ 5.2.3
229
+ ---------
230
+
231
+ - Warning message on invalid REDIS\_PROVIDER [#3970]
232
+ - Add `sidekiqctl status` command [#4003, dzunk]
233
+ - Update elapsed time calculatons to use monotonic clock [#3999]
234
+ - Fix a few issues with mobile Web UI styling [#3973, navied]
235
+ - Jobs with `retry: false` now go through the global `death_handlers`,
236
+ meaning you can take action on failed ephemeral jobs. [#3980, Benjamin-Dobell]
237
+ - Fix race condition in defining Workers. [#3997, mattbooks]
238
+
239
+ 5.2.2
240
+ ---------
241
+
242
+ - Raise error for duplicate queue names in config to avoid unexpected fetch algorithm change [#3911]
243
+ - Fix concurrency bug on JRuby [#3958, mattbooks]
244
+ - Add "Kill All" button to the retries page [#3938]
245
+
246
+ 5.2.1
247
+ -----------
248
+
249
+ - Fix concurrent modification error during heartbeat [#3921]
250
+
251
+ 5.2.0
252
+ -----------
253
+
254
+ - **Decrease default concurrency from 25 to 10** [#3892]
255
+ - Verify connection pool sizing upon startup [#3917]
256
+ - Smoother scheduling for large Sidekiq clusters [#3889]
257
+ - Switch Sidekiq::Testing impl from alias\_method to Module#prepend, for resiliency [#3852]
258
+ - Update Sidekiq APIs to use SCAN for scalability [#3848, ffiller]
259
+ - Remove concurrent-ruby gem dependency [#3830]
260
+ - Optimize Web UI's bootstrap.css [#3914]
261
+
262
+ 5.1.3
263
+ -----------
264
+
265
+ - Fix version comparison so Ruby 2.2.10 works. [#3808, nateberkopec]
266
+
267
+ 5.1.2
268
+ -----------
269
+
270
+ - Add link to docs in Web UI footer
271
+ - Fix crash on Ctrl-C in Windows [#3775, Bernica]
272
+ - Remove `freeze` calls on String constants. This is superfluous with Ruby
273
+ 2.3+ and `frozen_string_literal: true`. [#3759]
274
+ - Fix use of AR middleware outside of Rails [#3787]
275
+ - Sidekiq::Worker `sidekiq_retry_in` block can now return nil or 0 to use
276
+ the default backoff delay [#3796, dsalahutdinov]
277
+
278
+ 5.1.1
279
+ -----------
280
+
281
+ - Fix Web UI incompatibility with Redis 3.x gem [#3749]
282
+
283
+ 5.1.0
284
+ -----------
285
+
286
+ - **NEW** Global death handlers - called when your job exhausts all
287
+ retries and dies. Now you can take action when a job fails permanently. [#3721]
288
+ - **NEW** Enable ActiveRecord query cache within jobs by default [#3718, sobrinho]
289
+ This will prevent duplicate SELECTS; cache is cleared upon any UPDATE/INSERT/DELETE.
290
+ See the issue for how to bypass the cache or disable it completely.
291
+ - Scheduler timing is now more accurate, 15 -> 5 seconds [#3734]
292
+ - Exceptions during the :startup event will now kill the process [#3717]
293
+ - Make `Sidekiq::Client.via` reentrant [#3715]
294
+ - Fix use of Sidekiq logger outside of the server process [#3714]
295
+ - Tweak `constantize` to better match Rails class lookup. [#3701, caffeinated-tech]
296
+
297
+ 5.0.5
298
+ -----------
299
+
300
+ - Update gemspec to allow newer versions of the Redis gem [#3617]
301
+ - Refactor Worker.set so it can be memoized [#3602]
302
+ - Fix display of Redis URL in web footer, broken in 5.0.3 [#3560]
303
+ - Update `Sidekiq::Job#display_args` to avoid mutation [#3621]
304
+
305
+ 5.0.4
306
+ -----------
307
+
308
+ - Fix "slow startup" performance regression from 5.0.2. [#3525]
309
+ - Allow users to disable ID generation since some redis providers disable the CLIENT command. [#3521]
310
+
311
+ 5.0.3
312
+ -----------
313
+
314
+ - Fix overriding `class_attribute` core extension from ActiveSupport with Sidekiq one [PikachuEXE, #3499]
315
+ - Allow job logger to be overridden [AlfonsoUceda, #3502]
316
+ - Set a default Redis client identifier for debugging [#3516]
317
+ - Fix "Uninitialized constant" errors on startup with the delayed extensions [#3509]
318
+
319
+ 5.0.2
320
+ -----------
321
+
322
+ - fix broken release, thanks @nateberkopec
323
+
324
+ 5.0.1
325
+ -----------
326
+
327
+ - Fix incorrect server identity when daemonizing [jwilm, #3496]
328
+ - Work around error running Web UI against Redis Cluster [#3492]
329
+ - Remove core extensions, Sidekiq is now monkeypatch-free! [#3474]
330
+ - Reimplement Web UI's HTTP\_ACCEPT\_LANGUAGE parsing because the spec is utterly
331
+ incomprehensible for various edge cases. [johanlunds, natematykiewicz, #3449]
332
+ - Update `class_attribute` core extension to avoid warnings
333
+ - Expose `job_hash_context` from `Sidekiq::Logging` to support log customization
334
+
335
+ 5.0.0
336
+ -----------
337
+
338
+ - **BREAKING CHANGE** Job dispatch was refactored for safer integration with
339
+ Rails 5. The **Logging** and **RetryJobs** server middleware were removed and
340
+ functionality integrated directly into Sidekiq::Processor. These aren't
341
+ commonly used public APIs so this shouldn't impact most users.
342
+ ```
343
+ Sidekiq::Middleware::Server::RetryJobs -> Sidekiq::JobRetry
344
+ Sidekiq::Middleware::Server::Logging -> Sidekiq::JobLogger
345
+ ```
346
+ - Quieting Sidekiq is now done via the TSTP signal, the USR1 signal is deprecated.
347
+ - The `delay` extension APIs are no longer available by default, you
348
+ must opt into them.
349
+ - The Web UI is now BiDi and can render RTL languages like Arabic, Farsi and Hebrew.
350
+ - Rails 3.2 and Ruby 2.0 and 2.1 are no longer supported.
351
+ - The `SomeWorker.set(options)` API was re-written to avoid thread-local state. [#2152]
352
+ - Sidekiq Enterprise's encrypted jobs now display "[encrypted data]" in the Web UI instead
353
+ of random hex bytes.
354
+ - Please see the [5.0 Upgrade notes](5.0-Upgrade.md) for more detail.
355
+
356
+ 4.2.10
4
357
  -----------
5
358
 
6
359
  - Scheduled jobs can now be moved directly to the Dead queue via API [#3390]