sidekiq 5.2.3 → 6.0.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of sidekiq might be problematic. Click here for more details.

Files changed (64) hide show
  1. checksums.yaml +5 -5
  2. data/.circleci/config.yml +61 -0
  3. data/.gitignore +1 -1
  4. data/.standard.yml +20 -0
  5. data/6.0-Upgrade.md +70 -0
  6. data/COMM-LICENSE +11 -9
  7. data/Changes.md +61 -0
  8. data/Ent-2.0-Upgrade.md +37 -0
  9. data/Ent-Changes.md +27 -1
  10. data/Gemfile +19 -9
  11. data/Gemfile.lock +196 -0
  12. data/Pro-5.0-Upgrade.md +25 -0
  13. data/Pro-Changes.md +19 -2
  14. data/README.md +17 -31
  15. data/Rakefile +6 -4
  16. data/bin/sidekiqload +27 -23
  17. data/bin/sidekiqmon +9 -0
  18. data/lib/generators/sidekiq/templates/worker_test.rb.erb +1 -1
  19. data/lib/generators/sidekiq/worker_generator.rb +12 -14
  20. data/lib/sidekiq.rb +56 -43
  21. data/lib/sidekiq/api.rb +138 -151
  22. data/lib/sidekiq/cli.rb +141 -206
  23. data/lib/sidekiq/client.rb +45 -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 +5 -6
  31. data/lib/sidekiq/job_logger.rb +37 -7
  32. data/lib/sidekiq/job_retry.rb +55 -57
  33. data/lib/sidekiq/launcher.rb +59 -51
  34. data/lib/sidekiq/logger.rb +69 -0
  35. data/lib/sidekiq/manager.rb +7 -9
  36. data/lib/sidekiq/middleware/chain.rb +3 -2
  37. data/lib/sidekiq/middleware/i18n.rb +5 -7
  38. data/lib/sidekiq/monitor.rb +148 -0
  39. data/lib/sidekiq/paginator.rb +11 -12
  40. data/lib/sidekiq/processor.rb +68 -58
  41. data/lib/sidekiq/rails.rb +24 -29
  42. data/lib/sidekiq/redis_connection.rb +31 -37
  43. data/lib/sidekiq/scheduled.rb +17 -19
  44. data/lib/sidekiq/testing.rb +22 -23
  45. data/lib/sidekiq/testing/inline.rb +2 -1
  46. data/lib/sidekiq/util.rb +17 -14
  47. data/lib/sidekiq/version.rb +2 -1
  48. data/lib/sidekiq/web.rb +41 -49
  49. data/lib/sidekiq/web/action.rb +14 -10
  50. data/lib/sidekiq/web/application.rb +61 -58
  51. data/lib/sidekiq/web/helpers.rb +72 -66
  52. data/lib/sidekiq/web/router.rb +17 -14
  53. data/lib/sidekiq/worker.rb +134 -102
  54. data/sidekiq.gemspec +16 -18
  55. data/web/assets/javascripts/dashboard.js +2 -21
  56. data/web/assets/stylesheets/bootstrap.css +1 -1
  57. data/web/locales/ja.yml +2 -1
  58. data/web/views/queues.erb +1 -1
  59. metadata +31 -26
  60. data/.travis.yml +0 -14
  61. data/bin/sidekiqctl +0 -237
  62. data/lib/sidekiq/core_ext.rb +0 -1
  63. data/lib/sidekiq/logging.rb +0 -122
  64. data/lib/sidekiq/middleware/server/active_record.rb +0 -23
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 0f67e98eb8e3fff8ee4d57f08d5668e41b320fa4
4
- data.tar.gz: a11f770fd95fd45b3c0be43beee5c83417811fd4
2
+ SHA256:
3
+ metadata.gz: fda3ed37e1d981e1b32eea70669c678d400c071a9146a919848bcc598612de25
4
+ data.tar.gz: 6580ab6c188b2514efe807479ca25c06ea584d1def175d84d94639bc20f80b1e
5
5
  SHA512:
6
- metadata.gz: 3e6739681028126924c049e41bbfcdc92bea0d1ee4fb965f4e332da4cca9f10352f5cf18e05345a843d19b6111510f55c88aa97f4e21585bf66b479b7ae2f9bc
7
- data.tar.gz: 07f0432c69395be2933f152acb09c8fa4fe43be104011df237b0b4db56073b4725eb3fa3073872376f09d072ea15608f79a32b3dc28104ba18665082ad64adf4
6
+ metadata.gz: 25682d3dbf99d29fa3f56b7c74419863d3549b6e0c182e69c83fbc02a2955d053bca85eec53b474d4d22c7526e44e865f378aa4111152a91377b373be27c4d47
7
+ data.tar.gz: e55d07434b1e2ab26df6748101bf10640fc08d4d93f00b75ed04d82ed309ee8529d652982430cd00671c98b5e53cc733bef4b686df58a6b0e116ba04c12139aa
@@ -0,0 +1,61 @@
1
+ version: 2
2
+ references:
3
+ unit: &unit
4
+ run:
5
+ name: Run test suite
6
+ command: bundle exec rake
7
+ restore: &restore
8
+ restore_cache:
9
+ keys:
10
+ - v1-dependencies-{{ checksum "Gemfile.lock" }}
11
+ # fallback to using the latest cache if no exact match is found
12
+ - v1-dependencies-
13
+ bundle: &bundle
14
+ run:
15
+ name: install dependencies
16
+ command: |
17
+ bundle install --jobs=4 --retry=3 --path vendor/bundle
18
+ save: &save
19
+ save_cache:
20
+ paths:
21
+ - ./vendor/bundle
22
+ key: v1-dependencies-{{ checksum "Gemfile.lock" }}
23
+ jobs:
24
+ "ruby-2.5":
25
+ docker:
26
+ - image: circleci/ruby:2.5
27
+ - image: circleci/redis:4.0
28
+ steps:
29
+ - checkout
30
+ - <<: *restore
31
+ - <<: *bundle
32
+ - <<: *save
33
+ - <<: *unit
34
+ "ruby-2.6":
35
+ docker:
36
+ - image: circleci/ruby:2.6
37
+ - image: circleci/redis:4.0
38
+ steps:
39
+ - checkout
40
+ - <<: *restore
41
+ - <<: *bundle
42
+ - <<: *save
43
+ - <<: *unit
44
+ "jruby":
45
+ docker:
46
+ - image: circleci/jruby:latest
47
+ - image: circleci/redis:4.0
48
+ steps:
49
+ - checkout
50
+ - <<: *restore
51
+ - <<: *bundle
52
+ - <<: *save
53
+ - <<: *unit
54
+
55
+ workflows:
56
+ version: 2
57
+ build:
58
+ jobs:
59
+ - "ruby-2.5"
60
+ - "ruby-2.6"
61
+ - "jruby"
data/.gitignore CHANGED
@@ -1,7 +1,6 @@
1
1
  .rvmrc
2
2
  .ruby-version
3
3
  tags
4
- Gemfile.lock
5
4
  *.swp
6
5
  dump.rdb
7
6
  .rbx
@@ -11,3 +10,4 @@ vendor/
11
10
  .sass-cache/
12
11
  tmp/
13
12
  pkg/*.gem
13
+ .byebug_history
@@ -0,0 +1,20 @@
1
+ ruby_version: 2.5.0
2
+ fix: false
3
+ parallel: true
4
+ ignore:
5
+ - test/**/*
6
+ - examples/**/*
7
+ - myapp/**/*
8
+ - 'lib/sidekiq.rb':
9
+ - Lint/InheritException
10
+ - 'lib/sidekiq/extensions/**/*':
11
+ - Style/MethodMissingSuper
12
+ - Style/MissingRespondToMissing
13
+ - 'lib/**/*':
14
+ - Naming/AsciiIdentifiers
15
+ - Lint/RescueException
16
+ - Security/YAMLLoad
17
+ - Naming/AccessorMethodName
18
+ - Naming/MethodName
19
+ - Style/GlobalVars
20
+ - Style/Alias
@@ -0,0 +1,70 @@
1
+ # Welcome to Sidekiq 6.0!
2
+
3
+ Sidekiq 6.0 contains some breaking changes which streamline proper operation
4
+ of Sidekiq. It also drops support for EOL versions of Ruby and Rails.
5
+
6
+ ## What's New
7
+
8
+ This release has major breaking changes. Read and test carefully in production.
9
+
10
+ - ActiveJobs can now use `sidekiq_options` directly to configure Sidekiq
11
+ features/internals like the retry subsystem. Prefer the native
12
+ Sidekiq::Worker APIs as some Sidekiq features (e.g. unique jobs) do not work well with AJ.
13
+ ```ruby
14
+ class MyJob < ActiveJob::Base
15
+ queue_as :myqueue
16
+ sidekiq_options retry: 10, backtrace: 20
17
+ def perform(...)
18
+ end
19
+ end
20
+ ```
21
+ - Logging has been redesigned to allow pluggable formatters and several
22
+ formats ship with Sidekiq:
23
+ * default - your typical output on macOS
24
+ * heroku - enabled specifically when running in Heroku
25
+ * json - a JSON format for search indexing, one hash per line
26
+
27
+ Sidekiq will enable the best formatter for the detected environment but
28
+ you can override it by configuring the log formatter explicitly. See
29
+ 'sidekiq/logger' for implementation details.
30
+
31
+ ```ruby
32
+ Sidekiq.configure_server do |config|
33
+ config.log_formatter = AcmeCorp::PlainLogFormatter.new
34
+ # config.log_formatter = Sidekiq::Logger::Format::JSON.new
35
+ end
36
+ ```
37
+ - **Remove the daemonization, logfile and pidfile command line arguments and `sidekiqctl` binary**.
38
+ I've [noted for years](https://www.mikeperham.com/2014/09/22/dont-daemonize-your-daemons/)
39
+ how modern services should be managed with a proper init system.
40
+ Managing services manually is more error-prone, let your operating system do it for you.
41
+ systemd, upstart, and foreman are three options. See the Deployment wiki page for the latest details.
42
+ - **Validate proper usage of the `REDIS_PROVIDER` variable.**
43
+ This variable is meant to hold the name of the environment
44
+ variable which contains your Redis URL, so that you can switch Redis
45
+ providers quickly and easily with a single variable change. It is not
46
+ meant to hold the actual Redis URL itself. If you want to manually set
47
+ the Redis URL then you may set `REDIS_URL` directly. [#3969]
48
+ - **Increase default shutdown timeout from 8 seconds to 25 seconds.**
49
+ Both Heroku and ECS now use 30 second shutdown timeout
50
+ by default and we want Sidekiq to take advantage of this time. If you
51
+ have deployment scripts which depend on the old default timeout, use `-t 8` to
52
+ get the old behavior. [#3968]
53
+ * **Rails <5** is no longer supported. Rails 6+ only works in zeitwerk mode.
54
+ * **Ruby <2.5** is no longer supported.
55
+ * **Redis <4** is no longer supported.
56
+
57
+ ## Upgrade
58
+
59
+ As always, please upgrade Sidekiq **one major version at a time**.
60
+ If you are already running Sidekiq 5.x, then:
61
+
62
+ * Upgrade to the latest Sidekiq 5.x.
63
+ ```ruby
64
+ gem 'sidekiq', '< 6'
65
+ ```
66
+ * Fix any deprecation warnings you see.
67
+ * Upgrade to 6.x.
68
+ ```ruby
69
+ gem 'sidekiq', '< 7'
70
+ ```
@@ -14,13 +14,15 @@ In order to use the Software under this Agreement, you must receive a “Source
14
14
 
15
15
  1.2 Unlimited Organization License. If you purchased an Organization License (included with the Sidekiq Pro Software), you may install the Software on an unlimited number of Hosts. “Host” means any physical or virtual machine which is controlled by you. You may also run an unlimited number of Workers. “Worker” means a thread within a Sidekiq server process which executes jobs. You may concurrently run the software on an unlimited number of Hosts, with each host running an unlimited number of Workers.
16
16
 
17
- 1.3 Limited Organization License. If you purchased an Organization License (included with the Sidekiq Enterprise Software), you may install the Software on an unlimited number of Hosts. “Host” means any physical or virtual machine which is controlled by you. The aggregate number of Workers run by the hosts must not exceed the maximum number of Workers authorized at the time of purchase. “Worker” means a thread within a Sidekiq server process which executes jobs. In order to run additional Workers, you must purchase an additional allowance from Contributed Systems.
17
+ 1.3 Limited Enterprise License. If you purchased a Limited License for the Sidekiq Enterprise Software, you may install the Software on an unlimited number of Hosts. “Host” means any physical or virtual machine which is controlled by you. The aggregate number of Workers run by the hosts must not exceed the maximum number of Workers authorized at the time of purchase. “Worker” means a thread within a Sidekiq server process which executes jobs. In order to run additional Workers, you must purchase an additional allowance from Contributed Systems.
18
18
 
19
- 1.4 Appliance License. If you purchased an Appliance License, you may distribute the Software in any applications, frameworks, or elements (collectively referred to as an “Application” or “Applications”) that you develop using the Software in accordance with this EULA, provided that such distribution does not violate the restrictions set forth in section 3 of this EULA. You must not remove, obscure or interfere with any copyright, acknowledgment, attribution, trademark, warning or disclaimer statement affixed to, incorporated in or otherwise applied in connection with the Software. You are required to ensure that the Software is not reused by or with any applications other than those with which you distribute it as permitted herein. For example, if You install the Software on a customer’s server, that customer is not permitted to use the Software independently of your Application. You must inform Contributed Systems of your knowledge of any infringing use of the Software by any of your customers. You are liable for compliance by those third parties with the terms and conditions of this EULA. You will not owe Contributed Systems any royalties for your distribution of the Software in accordance with this EULA.
19
+ 1.4 Enterprise Site License. If you purchased a Site License for the Sidekiq Enterprise Software, you may install the Software on an unlimited number of Hosts. “Host” means any physical or virtual machine which is controlled by you. You may also run an unlimited number of Workers. “Worker” means a thread within a Sidekiq server process which executes jobs. You may concurrently run the software on an unlimited number of Hosts, with each host running an unlimited number of Workers.
20
20
 
21
- 1.5 Archive Copies. You are entitled to make a reasonable amount of copies of the Software for archival purposes. Each copy must reproduce all copyright and other proprietary rights notices on or in the Software Product.
21
+ 1.5 Appliance License. If you purchased an Appliance License, you may distribute the Software in any applications, frameworks, or elements (collectively referred to as an “Application” or “Applications”) that you develop using the Software in accordance with this EULA, provided that such distribution does not violate the restrictions set forth in section 3 of this EULA. You must not remove, obscure or interfere with any copyright, acknowledgment, attribution, trademark, warning or disclaimer statement affixed to, incorporated in or otherwise applied in connection with the Software. You are required to ensure that the Software is not reused by or with any applications other than those with which you distribute it as permitted herein. For example, if You install the Software on a customer's server, that customer is not permitted to use the Software independently of your Application. You must inform Contributed Systems of your knowledge of any infringing use of the Software by any of your customers. You are liable for compliance by those third parties with the terms and conditions of this EULA. You will not owe Contributed Systems any royalties for your distribution of the Software in accordance with this EULA.
22
22
 
23
- 1.6 Electronic Delivery. All Software and license documentation shall be delivered by electronic means unless otherwise specified on the applicable invoice or at the time of purchase. Software shall be deemed delivered when it is made available for download by you (“Delivery”).
23
+ 1.6 Archive Copies. You are entitled to make a reasonable amount of copies of the Software for archival purposes. Each copy must reproduce all copyright and other proprietary rights notices on or in the Software Product.
24
+
25
+ 1.7 Electronic Delivery. All Software and license documentation shall be delivered by electronic means unless otherwise specified on the applicable invoice or at the time of purchase. Software shall be deemed delivered when it is made available for download by you (“Delivery”).
24
26
 
25
27
  2. Modifications. Contributed Systems shall provide you with source code so that you can create Modifications of the original software. “Modification” means: (a) any addition to or deletion from the contents of a file included in the original Software or previous Modifications created by You, or (b) any new file that contains any part of the original Software or previous Modifications. While you retain all rights to any original work authored by you as part of the Modifications, We continue to own all copyright and other intellectual property rights in the Software.
26
28
 
@@ -31,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,67 @@
2
2
 
3
3
  [Sidekiq Changes](https://github.com/mperham/sidekiq/blob/master/Changes.md) | [Sidekiq Pro Changes](https://github.com/mperham/sidekiq/blob/master/Pro-Changes.md) | [Sidekiq Enterprise Changes](https://github.com/mperham/sidekiq/blob/master/Ent-Changes.md)
4
4
 
5
+ 6.0
6
+ ---------
7
+
8
+ This release has major breaking changes. Read and test carefully in production.
9
+
10
+ - ActiveJobs can now use `sidekiq_options` directly to configure Sidekiq
11
+ features/internals like the retry subsystem. [#4213, pirj]
12
+ ```ruby
13
+ class MyJob < ActiveJob::Base
14
+ queue_as :myqueue
15
+ sidekiq_options retry: 10, backtrace: 20
16
+ def perform(...)
17
+ end
18
+ end
19
+ ```
20
+ - **BREAKING CHANGE** Validate proper usage of the `REDIS_PROVIDER`
21
+ variable. This variable is meant to hold the name of the environment
22
+ variable which contains your Redis URL, so that you can switch Redis
23
+ providers quickly and easily with a single variable change. It is not
24
+ meant to hold the actual Redis URL itself. If you want to manually set
25
+ the Redis URL (not recommended as it implies you have no failover),
26
+ then you may set `REDIS_URL` directly. [#3969]
27
+ - **BREAKING CHANGE** Increase default shutdown timeout from 8 seconds
28
+ to 25 seconds. Both Heroku and ECS now use 30 second shutdown timeout
29
+ by default and we want Sidekiq to take advantage of this time. If you
30
+ have deployment scripts which depend on the old default timeout, use `-t 8` to
31
+ get the old behavior. [#3968]
32
+ - **BREAKING CHANGE** Remove the daemonization, logfile and pidfile
33
+ arguments to Sidekiq. Use a proper process supervisor (e.g. systemd or
34
+ foreman) to manage Sidekiq. See the Deployment wiki page for links to
35
+ more resources.
36
+ - Integrate the StandardRB code formatter to ensure consistent code
37
+ styling. [#4114, gearnode]
38
+
39
+ 5.2.7
40
+ ---------
41
+
42
+ - Fix stale `enqueued_at` when retrying [#4149]
43
+ - Move build to [Circle CI](https://circleci.com/gh/mperham/sidekiq) [#4120]
44
+
45
+ 5.2.6
46
+ ---------
47
+
48
+ - Fix edge case where a job failure during Redis outage could result in a lost job [#4141]
49
+ - Better handling of malformed job arguments in payload [#4095]
50
+ - Restore bootstap's dropdown css component [#4099, urkle]
51
+ - Display human-friendly time diff for longer queue latencies [#4111, interlinked]
52
+ - Allow `Sidekiq::Worker#set` to be chained
53
+
54
+ 5.2.5
55
+ ---------
56
+
57
+ - Fix default usage of `config/sidekiq.yml` [#4077, Tensho]
58
+
59
+ 5.2.4
60
+ ---------
61
+
62
+ - Add warnings for various deprecations and changes coming in Sidekiq 6.0.
63
+ See the 6-0 branch. [#4056]
64
+ - Various improvements to the Sidekiq test suite and coverage [#4026, #4039, Tensho]
65
+
5
66
  5.2.3
6
67
  ---------
7
68
 
@@ -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
+ ```
@@ -4,9 +4,35 @@
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.0
8
8
  -------------
9
9
 
10
+ - Except for the [newly required credentials](/mperham/sidekiq/issue/4232), Sidekiq Enterprise 2.0 does
11
+ not have any significant migration steps.
12
+ - Sidekiq Enterprise must now be started with valid license credentials. [#4232]
13
+ - Call `GC.compact` if possible in sidekiqswarm before forking [#4181]
14
+ - Changes for forward-compatibility with Sidekiq 6.0.
15
+ - Add death handler to remove any lingering unique locks [#4162]
16
+ - Backoff can now be customized per rate limiter [#4219]
17
+ - Code formatting changes for StandardRB
18
+
19
+ 1.8.1
20
+ -------------
21
+
22
+ - Fix excessive lock reclaims with concurrent limiter [#4105]
23
+ - 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.
24
+
25
+ 1.8.0
26
+ -------------
27
+
28
+ - Require Sidekiq Pro 4.0 and Sidekiq 5.2.
29
+ - Refactor historical metrics API to use revamped Statsd support in Sidekiq Pro
30
+ - Add a gauge to historical metrics for `default` queue latency [#4079]
31
+
32
+ 1.7.2
33
+ -------------
34
+
35
+ - Add PT and JA translations
10
36
  - Fix elapsed time calculations to use monotonic clock [#4000, sj26]
11
37
  - Fix edge case where flapping leadership would cause old periodic
12
38
  jobs to be fired once [#3974]
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"
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
@@ -0,0 +1,196 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ sidekiq (6.0.0)
5
+ connection_pool (>= 2.2.2)
6
+ rack (>= 2.0.0)
7
+ rack-protection (>= 2.0.0)
8
+ redis (>= 4.1.0)
9
+
10
+ GEM
11
+ remote: https://rubygems.org/
12
+ specs:
13
+ actioncable (6.0.0)
14
+ actionpack (= 6.0.0)
15
+ nio4r (~> 2.0)
16
+ websocket-driver (>= 0.6.1)
17
+ actionmailbox (6.0.0)
18
+ actionpack (= 6.0.0)
19
+ activejob (= 6.0.0)
20
+ activerecord (= 6.0.0)
21
+ activestorage (= 6.0.0)
22
+ activesupport (= 6.0.0)
23
+ mail (>= 2.7.1)
24
+ actionmailer (6.0.0)
25
+ actionpack (= 6.0.0)
26
+ actionview (= 6.0.0)
27
+ activejob (= 6.0.0)
28
+ mail (~> 2.5, >= 2.5.4)
29
+ rails-dom-testing (~> 2.0)
30
+ actionpack (6.0.0)
31
+ actionview (= 6.0.0)
32
+ activesupport (= 6.0.0)
33
+ rack (~> 2.0)
34
+ rack-test (>= 0.6.3)
35
+ rails-dom-testing (~> 2.0)
36
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
37
+ actiontext (6.0.0)
38
+ actionpack (= 6.0.0)
39
+ activerecord (= 6.0.0)
40
+ activestorage (= 6.0.0)
41
+ activesupport (= 6.0.0)
42
+ nokogiri (>= 1.8.5)
43
+ actionview (6.0.0)
44
+ activesupport (= 6.0.0)
45
+ builder (~> 3.1)
46
+ erubi (~> 1.4)
47
+ rails-dom-testing (~> 2.0)
48
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
49
+ activejob (6.0.0)
50
+ activesupport (= 6.0.0)
51
+ globalid (>= 0.3.6)
52
+ activemodel (6.0.0)
53
+ activesupport (= 6.0.0)
54
+ activerecord (6.0.0)
55
+ activemodel (= 6.0.0)
56
+ activesupport (= 6.0.0)
57
+ activestorage (6.0.0)
58
+ actionpack (= 6.0.0)
59
+ activejob (= 6.0.0)
60
+ activerecord (= 6.0.0)
61
+ marcel (~> 0.3.1)
62
+ activesupport (6.0.0)
63
+ concurrent-ruby (~> 1.0, >= 1.0.2)
64
+ i18n (>= 0.7, < 2)
65
+ minitest (~> 5.1)
66
+ tzinfo (~> 1.1)
67
+ zeitwerk (~> 2.1, >= 2.1.8)
68
+ ast (2.4.0)
69
+ builder (3.2.3)
70
+ byebug (11.0.1)
71
+ coderay (1.1.2)
72
+ concurrent-ruby (1.1.5)
73
+ connection_pool (2.2.2)
74
+ crass (1.0.4)
75
+ docile (1.3.2)
76
+ erubi (1.8.0)
77
+ globalid (0.4.2)
78
+ activesupport (>= 4.2.0)
79
+ hiredis (0.6.3)
80
+ i18n (1.6.0)
81
+ concurrent-ruby (~> 1.0)
82
+ jaro_winkler (1.5.3)
83
+ json (2.2.0)
84
+ loofah (2.2.3)
85
+ crass (~> 1.0.2)
86
+ nokogiri (>= 1.5.9)
87
+ mail (2.7.1)
88
+ mini_mime (>= 0.1.1)
89
+ marcel (0.3.3)
90
+ mimemagic (~> 0.3.2)
91
+ method_source (0.9.2)
92
+ mimemagic (0.3.3)
93
+ mini_mime (1.0.2)
94
+ mini_portile2 (2.4.0)
95
+ minitest (5.11.3)
96
+ nio4r (2.5.1)
97
+ nokogiri (1.10.4)
98
+ mini_portile2 (~> 2.4.0)
99
+ parallel (1.17.0)
100
+ parser (2.6.3.0)
101
+ ast (~> 2.4.0)
102
+ pry (0.12.2)
103
+ coderay (~> 1.1.0)
104
+ method_source (~> 0.9.0)
105
+ pry-byebug (3.7.0)
106
+ byebug (~> 11.0)
107
+ pry (~> 0.10)
108
+ rack (2.0.7)
109
+ rack-protection (2.0.7)
110
+ rack
111
+ rack-test (1.1.0)
112
+ rack (>= 1.0, < 3)
113
+ rails (6.0.0)
114
+ actioncable (= 6.0.0)
115
+ actionmailbox (= 6.0.0)
116
+ actionmailer (= 6.0.0)
117
+ actionpack (= 6.0.0)
118
+ actiontext (= 6.0.0)
119
+ actionview (= 6.0.0)
120
+ activejob (= 6.0.0)
121
+ activemodel (= 6.0.0)
122
+ activerecord (= 6.0.0)
123
+ activestorage (= 6.0.0)
124
+ activesupport (= 6.0.0)
125
+ bundler (>= 1.3.0)
126
+ railties (= 6.0.0)
127
+ sprockets-rails (>= 2.0.0)
128
+ rails-dom-testing (2.0.3)
129
+ activesupport (>= 4.2.0)
130
+ nokogiri (>= 1.6)
131
+ rails-html-sanitizer (1.2.0)
132
+ loofah (~> 2.2, >= 2.2.2)
133
+ railties (6.0.0)
134
+ actionpack (= 6.0.0)
135
+ activesupport (= 6.0.0)
136
+ method_source
137
+ rake (>= 0.8.7)
138
+ thor (>= 0.20.3, < 2.0)
139
+ rainbow (3.0.0)
140
+ rake (12.3.3)
141
+ redis (4.1.2)
142
+ redis-namespace (1.6.0)
143
+ redis (>= 3.0.4)
144
+ rubocop (0.72.0)
145
+ jaro_winkler (~> 1.5.1)
146
+ parallel (~> 1.10)
147
+ parser (>= 2.6)
148
+ rainbow (>= 2.2.2, < 4.0)
149
+ ruby-progressbar (~> 1.7)
150
+ unicode-display_width (>= 1.4.0, < 1.7)
151
+ rubocop-performance (1.4.1)
152
+ rubocop (>= 0.71.0)
153
+ ruby-progressbar (1.10.1)
154
+ simplecov (0.17.0)
155
+ docile (~> 1.1)
156
+ json (>= 1.8, < 3)
157
+ simplecov-html (~> 0.10.0)
158
+ simplecov-html (0.10.2)
159
+ sprockets (3.7.2)
160
+ concurrent-ruby (~> 1.0)
161
+ rack (> 1, < 3)
162
+ sprockets-rails (3.2.1)
163
+ actionpack (>= 4.0)
164
+ activesupport (>= 4.0)
165
+ sprockets (>= 3.0.0)
166
+ sqlite3 (1.4.1)
167
+ standard (0.1.2)
168
+ rubocop (~> 0.72.0)
169
+ rubocop-performance (~> 1.4.0)
170
+ thor (0.20.3)
171
+ thread_safe (0.3.6)
172
+ toxiproxy (1.0.3)
173
+ tzinfo (1.2.5)
174
+ thread_safe (~> 0.1)
175
+ unicode-display_width (1.6.0)
176
+ websocket-driver (0.7.1)
177
+ websocket-extensions (>= 0.1.0)
178
+ websocket-extensions (0.1.4)
179
+ zeitwerk (2.1.9)
180
+
181
+ PLATFORMS
182
+ ruby
183
+
184
+ DEPENDENCIES
185
+ activerecord-jdbcsqlite3-adapter
186
+ hiredis
187
+ minitest
188
+ pry-byebug
189
+ rails
190
+ rake
191
+ redis-namespace
192
+ sidekiq!
193
+ simplecov
194
+ sqlite3
195
+ standard
196
+ toxiproxy