sidekiq 3.2.0 → 4.0.2
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.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +9 -4
- data/3.0-Upgrade.md +1 -1
- data/4.0-Upgrade.md +50 -0
- data/COMM-LICENSE +56 -44
- data/Changes.md +207 -3
- data/Contributing.md +18 -11
- data/Ent-Changes.md +79 -0
- data/Gemfile +11 -1
- data/LICENSE +1 -1
- data/Pro-2.0-Upgrade.md +138 -0
- data/Pro-3.0-Upgrade.md +46 -0
- data/Pro-Changes.md +143 -1
- data/README.md +29 -24
- data/Rakefile +0 -1
- data/bin/sidekiq +4 -0
- data/bin/sidekiqctl +24 -16
- data/bin/sidekiqload +167 -0
- data/lib/generators/sidekiq/templates/worker.rb.erb +9 -0
- data/lib/generators/sidekiq/templates/worker_spec.rb.erb +6 -0
- data/lib/generators/sidekiq/templates/worker_test.rb.erb +8 -0
- data/lib/generators/sidekiq/worker_generator.rb +49 -0
- data/lib/sidekiq/api.rb +253 -101
- data/lib/sidekiq/cli.rb +75 -60
- data/lib/sidekiq/client.rb +52 -47
- data/lib/sidekiq/exception_handler.rb +1 -1
- data/lib/sidekiq/extensions/action_mailer.rb +18 -2
- data/lib/sidekiq/fetch.rb +35 -111
- data/lib/sidekiq/launcher.rb +108 -43
- data/lib/sidekiq/logging.rb +15 -8
- data/lib/sidekiq/manager.rb +81 -170
- data/lib/sidekiq/middleware/chain.rb +7 -2
- data/lib/sidekiq/middleware/i18n.rb +6 -0
- data/lib/sidekiq/middleware/server/logging.rb +14 -5
- data/lib/sidekiq/middleware/server/retry_jobs.rb +67 -41
- data/lib/sidekiq/paginator.rb +5 -3
- data/lib/sidekiq/processor.rb +128 -91
- data/lib/sidekiq/redis_connection.rb +24 -9
- data/lib/sidekiq/scheduled.rb +101 -60
- data/lib/sidekiq/testing.rb +149 -22
- data/lib/sidekiq/util.rb +32 -5
- data/lib/sidekiq/version.rb +1 -1
- data/lib/sidekiq/web.rb +64 -33
- data/lib/sidekiq/web_helpers.rb +118 -20
- data/lib/sidekiq/worker.rb +20 -5
- data/lib/sidekiq.rb +72 -24
- data/sidekiq.gemspec +10 -11
- data/test/helper.rb +46 -11
- data/test/test_actors.rb +137 -0
- data/test/test_api.rb +419 -375
- data/test/test_cli.rb +58 -59
- data/test/test_client.rb +62 -143
- data/test/test_exception_handler.rb +1 -1
- data/test/test_extensions.rb +30 -24
- data/test/test_fetch.rb +3 -58
- data/test/test_launcher.rb +80 -0
- data/test/test_logging.rb +34 -0
- data/test/test_manager.rb +22 -129
- data/test/test_middleware.rb +13 -6
- data/test/test_processor.rb +115 -75
- data/test/test_rails.rb +21 -0
- data/test/test_redis_connection.rb +1 -2
- data/test/test_retry.rb +166 -154
- data/test/test_scheduled.rb +59 -31
- data/test/test_scheduling.rb +27 -31
- data/test/test_sidekiq.rb +55 -13
- data/test/test_testing.rb +81 -21
- data/test/test_testing_fake.rb +87 -6
- data/test/test_testing_inline.rb +4 -4
- data/test/test_util.rb +16 -0
- data/test/test_web.rb +105 -19
- data/test/test_web_helpers.rb +53 -0
- data/web/assets/images/favicon.ico +0 -0
- data/web/assets/javascripts/application.js +44 -0
- data/web/assets/javascripts/dashboard.js +4 -8
- data/web/assets/javascripts/locales/jquery.timeago.pt-br.js +14 -14
- data/web/assets/javascripts/locales/jquery.timeago.uz.js +0 -0
- data/web/assets/stylesheets/application.css +139 -78
- data/web/locales/de.yml +2 -1
- data/web/locales/en.yml +4 -0
- data/web/locales/es.yml +1 -0
- data/web/locales/fr.yml +3 -2
- data/web/locales/hi.yml +75 -0
- data/web/locales/it.yml +1 -0
- data/web/locales/ja.yml +10 -1
- data/web/locales/{no.yml → nb.yml} +10 -2
- data/web/locales/ru.yml +9 -1
- data/web/locales/ta.yml +75 -0
- data/web/locales/uk.yml +76 -0
- data/web/views/_footer.erb +17 -0
- data/web/views/_job_info.erb +72 -66
- data/web/views/_nav.erb +58 -22
- data/web/views/_poll_js.erb +5 -0
- data/web/views/_poll_link.erb +7 -0
- data/web/views/_summary.erb +1 -1
- data/web/views/busy.erb +68 -60
- data/web/views/dashboard.erb +16 -11
- data/web/views/dead.erb +22 -18
- data/web/views/layout.erb +7 -29
- data/web/views/morgue.erb +43 -38
- data/web/views/queue.erb +32 -29
- data/web/views/queues.erb +26 -23
- data/web/views/retries.erb +46 -40
- data/web/views/retry.erb +22 -18
- data/web/views/scheduled.erb +33 -30
- data/web/views/scheduled_job_info.erb +1 -0
- metadata +92 -58
- data/lib/sidekiq/actor.rb +0 -39
- data/web/views/_poll.erb +0 -12
- /data/web/assets/javascripts/locales/{jquery.timeago.cz.js → jquery.timeago.cs.js} +0 -0
- /data/web/assets/javascripts/locales/{jquery.timeago.zh-CN.js → jquery.timeago.zh-cn.js} +0 -0
- /data/web/assets/javascripts/locales/{jquery.timeago.zh-TW.js → jquery.timeago.zh-tw.js} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 981fa47de9add237cde6413d7e97aa70726ae757
|
4
|
+
data.tar.gz: 52151d63cf02724358c925155d8f3471f453fe75
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 977c16381346d0fea1968ecd4d8efd2a5b900e0a0a4e4017c21fddeb910977b716959a7d8cb6515260ee4da4f58fe645a13a75b0985663594798e2f80980dcea
|
7
|
+
data.tar.gz: 2852d63ccf3686dfa438d468fdc6593ad25cd95c2f727d0c0e71625ab0c6fa42af394826105a0b7a12d103c635ea6beff8d2fb757e2ea53ef7bfb8c8785ad6e0
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -1,12 +1,17 @@
|
|
1
1
|
language: ruby
|
2
|
+
sudo: false
|
3
|
+
cache: bundler
|
2
4
|
services:
|
3
5
|
- redis-server
|
4
6
|
rvm:
|
5
|
-
- 1.
|
6
|
-
- jruby-19mode
|
7
|
-
- rbx-2
|
7
|
+
- 2.1.7
|
8
8
|
- 2.0.0
|
9
|
-
- 2.
|
9
|
+
- 2.2.4
|
10
|
+
- 2.3.0
|
11
|
+
- jruby
|
12
|
+
- jruby-head
|
13
|
+
- rbx-2
|
10
14
|
matrix:
|
11
15
|
allow_failures:
|
12
16
|
- rvm: rbx-2
|
17
|
+
- rvm: jruby-head
|
data/3.0-Upgrade.md
CHANGED
@@ -60,7 +60,7 @@ if Sidekiq::VERSION < '3'
|
|
60
60
|
end
|
61
61
|
else
|
62
62
|
Sidekiq.configure_server do |config|
|
63
|
-
config.error_handlers <<
|
63
|
+
config.error_handlers << proc {|ex,context| MyErrorService.notify(ex, context) }
|
64
64
|
end
|
65
65
|
end
|
66
66
|
```
|
data/4.0-Upgrade.md
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
# Welcome to Sidekiq 4.0!
|
2
|
+
|
3
|
+
Sidekiq 4.0 contains a redesigned, more efficient core with less overhead per job.
|
4
|
+
See my blog for [an overview of Sidekiq 4's higher performance](http://www.mikeperham.com/2015/10/14/optimizing-sidekiq/).
|
5
|
+
|
6
|
+
## What's New
|
7
|
+
|
8
|
+
* Sidekiq no longer uses Celluloid. If your application code uses Celluloid,
|
9
|
+
you will need to pull it in yourself.
|
10
|
+
|
11
|
+
* `redis-namespace` has been removed from Sidekiq's gem dependencies. If
|
12
|
+
you want to use namespacing ([and I strongly urge you not to](http://www.mikeperham.com/2015/09/24/storing-data-with-redis/)), you'll need to add the gem to your Gemfile:
|
13
|
+
```ruby
|
14
|
+
gem 'redis-namespace'
|
15
|
+
```
|
16
|
+
|
17
|
+
* **Redis 2.8.0 or greater is required.** Redis 2.8 was released two years
|
18
|
+
ago and contains **many** useful features which Sidekiq couldn't
|
19
|
+
leverage until now. **Redis 3.0.3 or greater is recommended** for large
|
20
|
+
scale use [#2431](https://github.com/mperham/sidekiq/issues/2431).
|
21
|
+
|
22
|
+
* Jobs are now fetched from Redis in parallel, making Sidekiq more
|
23
|
+
resilient to high network latency. This means that Sidekiq requires
|
24
|
+
more Redis connections per process. You must have a minimum of
|
25
|
+
`concurrency + 2` connections in your pool or Sidekiq will exit.
|
26
|
+
When in doubt, let Sidekiq size the connection pool for you.
|
27
|
+
|
28
|
+
* There's a new testing API based off the `Sidekiq::Queues` namespace. All
|
29
|
+
assertions made against the Worker class still work as expected.
|
30
|
+
```ruby
|
31
|
+
assert_equal 0, Sidekiq::Queues["default"].size
|
32
|
+
HardWorker.perform_async("log")
|
33
|
+
assert_equal 1, Sidekiq::Queues["default"].size
|
34
|
+
assert_equal "log", Sidekiq::Queues["default"].first['args'][0]
|
35
|
+
Sidekiq::Queues.clear_all
|
36
|
+
```
|
37
|
+
|
38
|
+
## Upgrade
|
39
|
+
|
40
|
+
First, make sure you are using Redis 2.8 or greater. Next:
|
41
|
+
|
42
|
+
* Upgrade to the latest Sidekiq 3.x.
|
43
|
+
```ruby
|
44
|
+
gem 'sidekiq', '< 4'
|
45
|
+
```
|
46
|
+
* Fix any deprecation warnings you see.
|
47
|
+
* Upgrade to 4.x.
|
48
|
+
```ruby
|
49
|
+
gem 'sidekiq', '< 5'
|
50
|
+
```
|
data/COMM-LICENSE
CHANGED
@@ -1,83 +1,95 @@
|
|
1
|
-
|
1
|
+
END-USER LICENSE AGREEMENT
|
2
2
|
|
3
|
-
|
3
|
+
------------------------------------------------------------------------------
|
4
4
|
|
5
|
-
|
5
|
+
IMPORTANT: THIS SOFTWARE END-USER LICENSE AGREEMENT ("EULA") IS A LEGAL AGREEMENT (“Agreement”) BETWEEN YOU (THE CUSTOMER, EITHER AS AN INDIVIDUAL OR, IF PURCHASED OR OTHERWISE ACQUIRED BY OR FOR AN ENTITY, AS AN ENTITY) AND CONTRIBUTED SYSTEMS. READ IT CAREFULLY BEFORE COMPLETING THE INSTALLATION PROCESS AND USING SIDEKIQ PRO AND RELATED SOFTWARE COMPONENTS (“SOFTWARE”). IT PROVIDES A LICENSE TO USE THE SOFTWARE AND CONTAINS WARRANTY INFORMATION AND LIABILITY DISCLAIMERS. BY INSTALLING AND USING THE SOFTWARE, YOU ARE CONFIRMING YOUR ACCEPTANCE OF THE SOFTWARE AND AGREEING TO BECOME BOUND BY THE TERMS OF THIS AGREEMENT.
|
6
6
|
|
7
|
-
|
7
|
+
------------------------------------------------------------------------------
|
8
8
|
|
9
|
-
|
9
|
+
In order to use the Software under this Agreement, you must receive a “Source URL” at the time of purchase, in accordance with the scope of use and other terms specified for each type of Software and as set forth in this Section 1 of this Agreement.
|
10
10
|
|
11
|
-
|
11
|
+
1. License Grant
|
12
12
|
|
13
|
-
|
13
|
+
1.1 General Use. This Agreement grants you a non-exclusive, non-transferable, limited license to the use rights for the Software, without the right to grant sublicenses, subject to the terms and conditions in this Agreement. The Software is licensed, not sold.
|
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
|
-
|
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.
|
18
18
|
|
19
|
-
You will not owe
|
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.
|
20
20
|
|
21
|
-
|
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.
|
22
22
|
|
23
|
-
|
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”).
|
24
24
|
|
25
|
-
|
25
|
+
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
26
|
|
27
|
-
|
27
|
+
3. Restricted Uses.
|
28
|
+
|
29
|
+
3.1 You shall not (and shall not allow any third party to): (a) decompile, disassemble, or otherwise reverse engineer the Software or attempt to reconstruct or discover any source code, underlying ideas, algorithms, file formats or programming interfaces of the Software by any means whatsoever (except and only to the extent that applicable law prohibits or restricts reverse engineering restrictions); (b) distribute, sell, sublicense, rent, lease or use the Software for time sharing, hosting, service provider or like purposes, except as expressly permitted under this Agreement; (c) redistribute the Software or Modifications other than by including the Software or a portion thereof within your own product, which must have substantially different functionality than the Software or Modifications and must not allow any third party to use the Software or Modifications, or any portions thereof, for software development or application development purposes; (d) redistribute the Software as part of a product, "appliance" or "virtual server"; (e) redistribute the Software on any server which is not directly under your control; (f) remove any product identification, proprietary, copyright or other notices contained in the Software; (g) modify any part of the Software, create a derivative work of any part of the Software (except as permitted in Section 4), or incorporate the Software, except to the extent expressly authorized in writing by Contributed Systems; (h) publicly disseminate performance information or analysis (including, without limitation, benchmarks) from any source relating to the Software; (i) utilize any equipment, device, software, or other means designed to circumvent or remove any form of Source URL or copy protection used by Contributed Systems in connection with the Software, or use the Software together with any authorization code, Source URL, serial number, or other copy protection device not supplied by Contributed Systems; (j) use the Software to develop a product which is competitive with any Contributed Systems product offerings; or (k) use unauthorized Source URLS or keycode(s) or distribute or publish Source URLs or keycode(s), except as may be expressly permitted by Contributed Systems in writing. If your unique Source URL is ever published, Contributed Systems reserves the right to terminate your access without notice.
|
30
|
+
|
31
|
+
3.2 UNDER NO CIRCUMSTANCES MAY YOU USE THE SOFTWARE FOR A PRODUCT THAT IS INTENDED FOR SOFTWARE OR APPLICATION DEVELOPMENT PURPOSES.
|
28
32
|
|
29
33
|
The Open Source version of the Software (“LGPL Version”) is licensed
|
30
34
|
under the terms of the GNU Lesser General Public License versions 3.0
|
31
|
-
(“LGPL”) and not under this
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
35
|
+
(“LGPL”) and not under this EULA.
|
36
|
+
|
37
|
+
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
|
+
|
39
|
+
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
|
+
|
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.
|
42
|
+
|
43
|
+
7. Term of Agreement.
|
44
|
+
|
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.
|
46
|
+
|
47
|
+
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
|
+
|
49
|
+
7.3 Expiration of License. Upon the expiration of any term under this Agreement, (a) all Software updates and services pursuant to the license shall cease, (b) you may only continue to run existing installations of the Software, (c) you may not install the Software on any additional Hosts, and (d) any new installation of the Software shall require the purchase of a new license subscription from Contributed Systems.
|
38
50
|
|
39
|
-
|
51
|
+
8. Disclaimer of Warranties. The Software is provided "as is," with all faults, defects and errors, and without warranty of any kind. Contributed Systems does not warrant that the Software will be free of bugs, errors, viruses or other defects, and Contributed Systems shall have no liability of any kind for the use of or inability to use the Software, the Software content or any associated service, and you acknowledge that it is not technically practicable for Contributed Systems to do so.
|
52
|
+
To the maximum extent permitted by applicable law, Contributed Systems disclaims all warranties, express, implied, arising by law or otherwise, regarding the Software, the Software content and their respective performance or suitability for your intended use, including without limitation any implied warranty of merchantability, fitness for a particular purpose.
|
40
53
|
|
41
|
-
|
54
|
+
9. Limitation of Liability.
|
42
55
|
|
43
|
-
|
56
|
+
In no event will Contributed Systems be liable for any direct, indirect, consequential, incidental, special, exemplary, or punitive damages or liabilities whatsoever arising from or relating to the Software, the Software content or this Agreement, whether based on contract, tort (including negligence), strict liability or other theory, even if Contributed Systems has been advised of the possibility of such damages.
|
44
57
|
|
45
|
-
|
58
|
+
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.
|
46
59
|
|
47
|
-
|
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.
|
48
61
|
|
49
|
-
|
62
|
+
11. Acknowledgements.
|
50
63
|
|
51
|
-
|
64
|
+
11.1 Consent to the Use of Data. You agree that Contributed Systems and its affiliates may collect and use technical information gathered as part of the product support services. Contributed Systems may use this information solely to improve products and services and will not disclose this information in a form that personally identifies you.
|
52
65
|
|
53
|
-
We or a certified auditor acting on
|
66
|
+
11.2 Verification. We or a certified auditor acting on our behalf, may, upon its reasonable request and at its expense, audit you with respect to the use of the Software. Such audit may be conducted by mail, electronic means or through an in-person visit to your place of business. Any such in-person audit shall be conducted during regular business hours at your facilities and shall not unreasonably interfere with your business activities. We shall not remove, copy, or redistribute any electronic material during the course of an audit. If an audit reveals that you are using the Software in a way that is in material violation of the terms of the EULA, then you shall pay our reasonable costs of conducting the audit. In the case of a material violation, you agree to pay Us any amounts owing that are attributable to the unauthorized use. In the alternative, We reserve the right, at our sole option, to terminate the licenses for the Software.
|
54
67
|
|
55
|
-
|
68
|
+
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.
|
56
69
|
|
57
|
-
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.
|
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.
|
58
71
|
|
59
|
-
10. PAYMENT AND TAXES
|
60
72
|
|
61
|
-
|
73
|
+
13. Miscellaneous
|
62
74
|
|
63
|
-
|
75
|
+
13.1 Entire Agreement. This Agreement sets forth our entire agreement with respect to the Software and the subject matter hereof and supersedes all prior and contemporaneous understandings and agreements whether written or oral.
|
64
76
|
|
65
|
-
|
77
|
+
13.2 Amendment. Contributed Systems reserves the right, in its sole discretion, to amend this Agreement from time. Amendments to this Agreement can be located at: https://github.com/mperham/sidekiq/blob/master/COMM-LICENSE.
|
66
78
|
|
67
|
-
|
79
|
+
13.3 Assignment. You may not assign this Agreement or any of its rights under this Agreement without the prior written consent of Contributed Systems and any attempted assignment without such consent shall be void.
|
68
80
|
|
69
|
-
|
81
|
+
13.4 Export Compliance. You agree to comply with all applicable laws and regulations, including laws, regulations, orders or other restrictions on export, re-export or redistribution of software.
|
70
82
|
|
71
|
-
You
|
83
|
+
13.5 Indemnification. You agree to defend, indemnify, and hold harmless Contributed Systems from and against any lawsuits, claims, losses, damages, fines and expenses (including attorneys' fees and costs) arising out of your use of the Software or breach of this Agreement.
|
72
84
|
|
73
|
-
|
85
|
+
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.
|
74
86
|
|
75
|
-
|
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.
|
76
88
|
|
77
|
-
If any provision
|
89
|
+
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.
|
78
90
|
|
79
|
-
|
91
|
+
13.9 Waiver. Failure or neglect by either party to enforce at any time any of the provisions of this licence Agreement shall not be construed or deemed to be a waiver of that party's rights under this Agreement.
|
80
92
|
|
81
|
-
|
93
|
+
13.10 Headings. The headings of sections and paragraphs of this Agreement are for convenience of reference only and are not intended to restrict, affect or be of any weight in the interpretation or construction of the provisions of such sections or paragraphs.
|
82
94
|
|
83
|
-
|
95
|
+
14. Contact Information. If you have any questions about this EULA, or if you want to contact Contributed Systems for any reason, please direct correspondence to info@contribsys.com.
|
data/Changes.md
CHANGED
@@ -1,3 +1,207 @@
|
|
1
|
+
# Sidekiq Changes
|
2
|
+
|
3
|
+
4.0.2
|
4
|
+
-----------
|
5
|
+
|
6
|
+
- Better Japanese translations
|
7
|
+
- Remove `json` gem dependency from gemspec. [#2743]
|
8
|
+
- There's a new testing API based off the `Sidekiq::Queues` namespace. All
|
9
|
+
assertions made against the Worker class still work as expected.
|
10
|
+
[#2676, brandonhilkert]
|
11
|
+
```ruby
|
12
|
+
assert_equal 0, Sidekiq::Queues["default"].size
|
13
|
+
HardWorker.perform_async("log")
|
14
|
+
assert_equal 1, Sidekiq::Queues["default"].size
|
15
|
+
assert_equal "log", Sidekiq::Queues["default"].first['args'][0]
|
16
|
+
Sidekiq::Queues.clear_all
|
17
|
+
```
|
18
|
+
|
19
|
+
4.0.1
|
20
|
+
-----------
|
21
|
+
|
22
|
+
- Yank new queue-based testing API [#2663]
|
23
|
+
- Fix invalid constant reference in heartbeat
|
24
|
+
|
25
|
+
4.0.0
|
26
|
+
-----------
|
27
|
+
|
28
|
+
- Sidekiq's internals have been completely overhauled for performance
|
29
|
+
and to remove dependencies. This has resulted in major speedups, as
|
30
|
+
[detailed on my blog](http://www.mikeperham.com/2015/10/14/optimizing-sidekiq/).
|
31
|
+
- See the [4.0 upgrade notes](4.0-Upgrade.md) for more detail.
|
32
|
+
|
33
|
+
3.5.3
|
34
|
+
-----------
|
35
|
+
|
36
|
+
- Adjust shutdown event to run in parallel with the rest of system shutdown. [#2635]
|
37
|
+
|
38
|
+
3.5.2
|
39
|
+
-----------
|
40
|
+
|
41
|
+
- **Sidekiq 3 is now in maintenance mode**, only major bugs will be fixed.
|
42
|
+
- The exception triggering a retry is now passed into `sidekiq_retry_in`,
|
43
|
+
allowing you to retry more frequently for certain types of errors.
|
44
|
+
[#2619, kreynolds]
|
45
|
+
```ruby
|
46
|
+
sidekiq_retry_in do |count, ex|
|
47
|
+
case ex
|
48
|
+
when RuntimeError
|
49
|
+
5 * count
|
50
|
+
else
|
51
|
+
10 * count
|
52
|
+
end
|
53
|
+
end
|
54
|
+
```
|
55
|
+
|
56
|
+
3.5.1
|
57
|
+
-----------
|
58
|
+
|
59
|
+
- **FIX MEMORY LEAK** Under rare conditions, threads may leak [#2598, gazay]
|
60
|
+
- Add Ukrainian locale [#2561, elrakita]
|
61
|
+
- Disconnect and retry Redis operations if we see a READONLY error [#2550]
|
62
|
+
- Add server middleware testing harness; see [wiki](https://github.com/mperham/sidekiq/wiki/Testing#testing-server-middleware) [#2534, ryansch]
|
63
|
+
|
64
|
+
3.5.0
|
65
|
+
-----------
|
66
|
+
|
67
|
+
- Polished new banner! [#2522, firedev]
|
68
|
+
- Upgrade to Celluloid 0.17. [#2420, digitalextremist]
|
69
|
+
- Activate sessions in Sinatra for CSRF protection, requires Rails
|
70
|
+
monkeypatch due to rails/rails#15843. [#2460, jc00ke]
|
71
|
+
|
72
|
+
3.4.2
|
73
|
+
-----------
|
74
|
+
|
75
|
+
- Don't allow `Sidekiq::Worker` in ActiveJob::Base classes. [#2424]
|
76
|
+
- Safer display of job data in Web UI [#2405]
|
77
|
+
- Fix CSRF vulnerability in Web UI, thanks to Egor Homakov for
|
78
|
+
reporting. [#2422] If you are running the Web UI as a standalone Rack app,
|
79
|
+
ensure you have a [session middleware
|
80
|
+
configured](https://github.com/mperham/sidekiq/wiki/Monitoring#standalone):
|
81
|
+
```ruby
|
82
|
+
use Rack::Session::Cookie, :secret => "some unique secret string here"
|
83
|
+
```
|
84
|
+
|
85
|
+
3.4.1
|
86
|
+
-----------
|
87
|
+
|
88
|
+
- Lock to Celluloid 0.16
|
89
|
+
|
90
|
+
|
91
|
+
3.4.0
|
92
|
+
-----------
|
93
|
+
|
94
|
+
- Set a `created_at` attribute when jobs are created, set `enqueued_at` only
|
95
|
+
when they go into a queue. Fixes invalid latency calculations with scheduled jobs.
|
96
|
+
[#2373, mrsimo]
|
97
|
+
- Don't log timestamp on Heroku [#2343]
|
98
|
+
- Run `shutdown` event handlers in reverse order of definition [#2374]
|
99
|
+
- Rename and rework `poll_interval` to be simpler, more predictable [#2317, cainlevy]
|
100
|
+
The new setting is `average_scheduled_poll_interval`. To configure
|
101
|
+
Sidekiq to look for scheduled jobs every 5 seconds, just set it to 5.
|
102
|
+
```ruby
|
103
|
+
Sidekiq.configure_server do |config|
|
104
|
+
config.average_scheduled_poll_interval = 5
|
105
|
+
end
|
106
|
+
```
|
107
|
+
|
108
|
+
3.3.4
|
109
|
+
-----------
|
110
|
+
|
111
|
+
- **Improved ActiveJob integration** - Web UI now shows ActiveJobs in a
|
112
|
+
nicer format and job logging shows the actual class name, requires
|
113
|
+
Rails 4.2.2+ [#2248, #2259]
|
114
|
+
- Add Sidekiq::Process#dump\_threads API to trigger TTIN output [#2247]
|
115
|
+
- Web UI polling now uses Ajax to avoid page reload [#2266, davydovanton]
|
116
|
+
- Several Web UI styling improvements [davydovanton]
|
117
|
+
- Add Tamil, Hindi translations for Web UI [ferdinandrosario, tejasbubane]
|
118
|
+
- Fix Web UI to work with country-specific locales [#2243]
|
119
|
+
- Handle circular error causes [#2285, eugenk]
|
120
|
+
|
121
|
+
3.3.3
|
122
|
+
-----------
|
123
|
+
|
124
|
+
- Fix crash on exit when Redis is down [#2235]
|
125
|
+
- Fix duplicate logging on startup
|
126
|
+
- Undeprecate delay extension for ActionMailer 4.2+ . [#2186]
|
127
|
+
|
128
|
+
3.3.2
|
129
|
+
-----------
|
130
|
+
|
131
|
+
- Add Sidekiq::Stats#queues back
|
132
|
+
- Allows configuration of dead job set size and timeout [#2173, jonhyman]
|
133
|
+
- Refactor scheduler enqueuing so Sidekiq Pro can override it. [#2159]
|
134
|
+
|
135
|
+
3.3.1
|
136
|
+
-----------
|
137
|
+
|
138
|
+
- Dumb down ActionMailer integration so it tries to deliver if possible [#2149]
|
139
|
+
- Stringify Sidekiq.default\_worker\_options's keys [#2126]
|
140
|
+
- Add random integer to process identity [#2113, michaeldiscala]
|
141
|
+
- Log Sidekiq Pro's Batch ID if available [#2076]
|
142
|
+
- Refactor Processor Redis usage to avoid redis/redis-rb#490 [#2094]
|
143
|
+
- Move /dashboard/stats to /stats. Add /stats/queues. [moserke, #2099]
|
144
|
+
- Add processes count to /stats [ismaelga, #2141]
|
145
|
+
- Greatly improve speed of Sidekiq::Stats [ismaelga, #2142]
|
146
|
+
- Add better usage text for `sidekiqctl`.
|
147
|
+
- `Sidekiq::Logging.with_context` is now a stack so you can set your
|
148
|
+
own job context for logging purposes [grosser, #2110]
|
149
|
+
- Remove usage of Google Fonts in Web UI so it loads in China [#2144]
|
150
|
+
|
151
|
+
3.3.0
|
152
|
+
-----------
|
153
|
+
|
154
|
+
- Upgrade to Celluloid 0.16 [#2056]
|
155
|
+
- Fix typo for generator test file name [dlackty, #2016]
|
156
|
+
- Add Sidekiq::Middleware::Chain#prepend [seuros, #2029]
|
157
|
+
|
158
|
+
3.2.6
|
159
|
+
-----------
|
160
|
+
|
161
|
+
- Deprecate delay extension for ActionMailer 4.2+ . [seuros, #1933]
|
162
|
+
- Poll interval tuning now accounts for dead processes [epchris, #1984]
|
163
|
+
- Add non-production environment to Web UI page titles [JacobEvelyn, #2004]
|
164
|
+
|
165
|
+
3.2.5
|
166
|
+
-----------
|
167
|
+
|
168
|
+
- Lock Celluloid to 0.15.2 due to bugs in 0.16.0. This prevents the
|
169
|
+
"hang on shutdown" problem with Celluloid 0.16.0.
|
170
|
+
|
171
|
+
3.2.4
|
172
|
+
-----------
|
173
|
+
|
174
|
+
- Fix issue preventing ActionMailer sends working in some cases with
|
175
|
+
Rails 4. [pbhogan, #1923]
|
176
|
+
|
177
|
+
3.2.3
|
178
|
+
-----------
|
179
|
+
|
180
|
+
- Clean invalid bytes from error message before converting to JSON (requires Ruby 2.1+) [#1705]
|
181
|
+
- Add queues list for each process to the Busy page. [davetoxa, #1897]
|
182
|
+
- Fix for crash caused by empty config file. [jordan0day, #1901]
|
183
|
+
- Add Rails Worker generator, `rails g sidekiq:worker User` will create `app/workers/user_worker.rb`. [seuros, #1909]
|
184
|
+
- Fix Web UI rendering with huge job arguments [jhass, #1918]
|
185
|
+
- Minor refactoring of Sidekiq::Client internals, for Sidekiq Pro. [#1919]
|
186
|
+
|
187
|
+
3.2.2
|
188
|
+
-----------
|
189
|
+
|
190
|
+
- **This version of Sidekiq will no longer start on Ruby 1.9.** Sidekiq
|
191
|
+
3 does not support MRI 1.9 but we've allowed it to run before now.
|
192
|
+
- Fix issue which could cause Sidekiq workers to disappear from the Busy
|
193
|
+
tab while still being active [#1884]
|
194
|
+
- Add "Back to App" button in Web UI. You can set the button link via
|
195
|
+
`Sidekiq::Web.app_url = 'http://www.mysite.com'` [#1875, seuros]
|
196
|
+
- Add process tag (`-g tag`) to the Busy page so you can differentiate processes at a glance. [seuros, #1878]
|
197
|
+
- Add "Kill" button to move retries directly to the DJQ so they don't retry. [seuros, #1867]
|
198
|
+
|
199
|
+
3.2.1
|
200
|
+
-----------
|
201
|
+
|
202
|
+
- Revert eager loading change for Rails 3.x apps, as it broke a few edge
|
203
|
+
cases.
|
204
|
+
|
1
205
|
3.2.0
|
2
206
|
-----------
|
3
207
|
|
@@ -108,7 +312,7 @@ end
|
|
108
312
|
occur anywhere within Sidekiq, not just within middleware.
|
109
313
|
```ruby
|
110
314
|
Sidekiq.configure_server do |config|
|
111
|
-
config.error_handlers <<
|
315
|
+
config.error_handlers << proc {|ex,ctx| ... }
|
112
316
|
end
|
113
317
|
```
|
114
318
|
- **Process Heartbeat** - each Sidekiq process will ping Redis every 5
|
@@ -167,7 +371,7 @@ middleware, see 3.0-Upgrade.md.**
|
|
167
371
|
|
168
372
|
- Automatically use the config file found at `config/sidekiq.yml`, if not passed `-C`. [#1481]
|
169
373
|
- Store 'retried\_at' and 'failed\_at' timestamps as Floats, not Strings. [#1473]
|
170
|
-
- A `USR2` signal will now reopen _all_ logs, using IO#reopen. Thus, instead of creating a new Logger object,
|
374
|
+
- A `USR2` signal will now reopen _all_ logs, using IO#reopen. Thus, instead of creating a new Logger object,
|
171
375
|
Sidekiq will now just update the existing Logger's file descriptor [#1163].
|
172
376
|
- Remove pidfile when shutting down if started with `-P` [#1470]
|
173
377
|
|
@@ -260,7 +464,7 @@ middleware, see 3.0-Upgrade.md.**
|
|
260
464
|
[Testing](https://github.com/mperham/sidekiq/wiki/Testing) for detail. [#1193]
|
261
465
|
- The Retries table has a new column for the error message.
|
262
466
|
- The Web UI topbar now contains the status and live poll button.
|
263
|
-
- Orphaned worker records are now auto-vacuumed when you
|
467
|
+
- Orphaned worker records are now auto-vacuumed when you visit the
|
264
468
|
Workers page in the Web UI.
|
265
469
|
- Sidekiq.default\_worker\_options allows you to configure default
|
266
470
|
options for all Sidekiq worker types.
|
data/Contributing.md
CHANGED
@@ -1,25 +1,32 @@
|
|
1
1
|
# Contributing
|
2
2
|
|
3
|
-
First of all, thank you! I hope you find it worthwhile to help out with Sidekiq.
|
4
|
-
|
5
3
|
## Issues
|
6
4
|
|
7
|
-
When opening an issue
|
5
|
+
When opening an issue:
|
8
6
|
|
9
|
-
|
7
|
+
* include the full **backtrace** with your error
|
8
|
+
* include your Sidekiq initializer
|
9
|
+
* list versions you are using: Ruby, Rails, Sidekiq, OS, etc.
|
10
10
|
|
11
|
-
|
12
|
-
some known areas which need improvement:
|
11
|
+
It's always better to include more info rather than less.
|
13
12
|
|
14
|
-
|
15
|
-
* The [Sidekiq issue tracker](https://github.com/mperham/sidekiq/issues) usually has a few ideas
|
16
|
-
* Your brilliant idea which I haven't listed!
|
13
|
+
## Code
|
17
14
|
|
18
15
|
It's always best to open an issue before investing a lot of time into a
|
19
16
|
fix or new functionality. Functionality must meet my design goals and
|
20
17
|
vision for the project to be accepted; I would be happy to discuss how
|
21
18
|
your idea can best fit into Sidekiq.
|
22
19
|
|
23
|
-
##
|
20
|
+
## Legal
|
21
|
+
|
22
|
+
By submitting a Pull Request, you disavow any rights or claims to any changes
|
23
|
+
submitted to the Sidekiq project and assign the copyright of
|
24
|
+
those changes to Contributed Systems LLC.
|
25
|
+
|
26
|
+
If you cannot or do not want to reassign those rights (your employment
|
27
|
+
contract for your employer may not allow this), you should not submit a PR.
|
28
|
+
Open an issue and someone else can do the work.
|
24
29
|
|
25
|
-
|
30
|
+
This is a legal way of saying "If you submit a PR to us, that code becomes ours".
|
31
|
+
99.9% of the time that's what you intend anyways; we hope it doesn't scare you
|
32
|
+
away from contributing.
|