sidekiq 3.5.4 → 5.2.7

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

Potentially problematic release.


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

Files changed (175) hide show
  1. checksums.yaml +5 -5
  2. data/.circleci/config.yml +61 -0
  3. data/{Contributing.md → .github/contributing.md} +0 -0
  4. data/.github/issue_template.md +11 -0
  5. data/.gitignore +3 -0
  6. data/.travis.yml +5 -10
  7. data/4.0-Upgrade.md +53 -0
  8. data/5.0-Upgrade.md +56 -0
  9. data/COMM-LICENSE +13 -11
  10. data/Changes.md +376 -1
  11. data/Ent-Changes.md +201 -2
  12. data/Gemfile +14 -18
  13. data/LICENSE +1 -1
  14. data/Pro-3.0-Upgrade.md +44 -0
  15. data/Pro-4.0-Upgrade.md +35 -0
  16. data/Pro-Changes.md +307 -2
  17. data/README.md +34 -22
  18. data/Rakefile +3 -3
  19. data/bin/sidekiq +0 -1
  20. data/bin/sidekiqctl +13 -86
  21. data/bin/sidekiqload +23 -27
  22. data/code_of_conduct.md +50 -0
  23. data/lib/generators/sidekiq/templates/worker_spec.rb.erb +3 -3
  24. data/lib/generators/sidekiq/templates/worker_test.rb.erb +6 -6
  25. data/lib/sidekiq.rb +72 -25
  26. data/lib/sidekiq/api.rb +206 -73
  27. data/lib/sidekiq/cli.rb +145 -101
  28. data/lib/sidekiq/client.rb +42 -36
  29. data/lib/sidekiq/core_ext.rb +1 -105
  30. data/lib/sidekiq/ctl.rb +221 -0
  31. data/lib/sidekiq/delay.rb +42 -0
  32. data/lib/sidekiq/exception_handler.rb +4 -5
  33. data/lib/sidekiq/extensions/action_mailer.rb +1 -0
  34. data/lib/sidekiq/extensions/active_record.rb +1 -0
  35. data/lib/sidekiq/extensions/class_methods.rb +1 -0
  36. data/lib/sidekiq/extensions/generic_proxy.rb +8 -1
  37. data/lib/sidekiq/fetch.rb +36 -111
  38. data/lib/sidekiq/job_logger.rb +25 -0
  39. data/lib/sidekiq/job_retry.rb +262 -0
  40. data/lib/sidekiq/launcher.rb +129 -55
  41. data/lib/sidekiq/logging.rb +21 -3
  42. data/lib/sidekiq/manager.rb +83 -182
  43. data/lib/sidekiq/middleware/chain.rb +1 -0
  44. data/lib/sidekiq/middleware/i18n.rb +1 -0
  45. data/lib/sidekiq/middleware/server/active_record.rb +10 -0
  46. data/lib/sidekiq/paginator.rb +1 -0
  47. data/lib/sidekiq/processor.rb +221 -103
  48. data/lib/sidekiq/rails.rb +47 -27
  49. data/lib/sidekiq/redis_connection.rb +74 -7
  50. data/lib/sidekiq/scheduled.rb +87 -28
  51. data/lib/sidekiq/testing.rb +150 -19
  52. data/lib/sidekiq/testing/inline.rb +1 -0
  53. data/lib/sidekiq/util.rb +15 -17
  54. data/lib/sidekiq/version.rb +2 -1
  55. data/lib/sidekiq/web.rb +120 -184
  56. data/lib/sidekiq/web/action.rb +89 -0
  57. data/lib/sidekiq/web/application.rb +353 -0
  58. data/lib/sidekiq/{web_helpers.rb → web/helpers.rb} +123 -47
  59. data/lib/sidekiq/web/router.rb +100 -0
  60. data/lib/sidekiq/worker.rb +135 -18
  61. data/sidekiq.gemspec +8 -14
  62. data/web/assets/images/{status-sd8051fd480.png → status.png} +0 -0
  63. data/web/assets/javascripts/application.js +24 -20
  64. data/web/assets/javascripts/dashboard.js +33 -18
  65. data/web/assets/stylesheets/application-rtl.css +246 -0
  66. data/web/assets/stylesheets/application.css +401 -7
  67. data/web/assets/stylesheets/bootstrap-rtl.min.css +9 -0
  68. data/web/assets/stylesheets/bootstrap.css +4 -8
  69. data/web/locales/ar.yml +81 -0
  70. data/web/locales/cs.yml +11 -1
  71. data/web/locales/de.yml +1 -1
  72. data/web/locales/en.yml +4 -0
  73. data/web/locales/es.yml +4 -3
  74. data/web/locales/fa.yml +80 -0
  75. data/web/locales/fr.yml +21 -12
  76. data/web/locales/he.yml +79 -0
  77. data/web/locales/ja.yml +24 -13
  78. data/web/locales/ru.yml +3 -0
  79. data/web/locales/ur.yml +80 -0
  80. data/web/views/_footer.erb +7 -9
  81. data/web/views/_job_info.erb +5 -1
  82. data/web/views/_nav.erb +5 -19
  83. data/web/views/_paging.erb +1 -1
  84. data/web/views/busy.erb +18 -9
  85. data/web/views/dashboard.erb +5 -5
  86. data/web/views/dead.erb +1 -1
  87. data/web/views/layout.erb +13 -5
  88. data/web/views/morgue.erb +16 -12
  89. data/web/views/queue.erb +12 -11
  90. data/web/views/queues.erb +5 -3
  91. data/web/views/retries.erb +19 -13
  92. data/web/views/retry.erb +2 -2
  93. data/web/views/scheduled.erb +4 -4
  94. data/web/views/scheduled_job_info.erb +1 -1
  95. metadata +45 -227
  96. data/lib/sidekiq/actor.rb +0 -39
  97. data/lib/sidekiq/middleware/server/logging.rb +0 -40
  98. data/lib/sidekiq/middleware/server/retry_jobs.rb +0 -206
  99. data/test/config.yml +0 -9
  100. data/test/env_based_config.yml +0 -11
  101. data/test/fake_env.rb +0 -0
  102. data/test/fixtures/en.yml +0 -2
  103. data/test/helper.rb +0 -49
  104. data/test/test_api.rb +0 -493
  105. data/test/test_cli.rb +0 -335
  106. data/test/test_client.rb +0 -194
  107. data/test/test_exception_handler.rb +0 -55
  108. data/test/test_extensions.rb +0 -126
  109. data/test/test_fetch.rb +0 -104
  110. data/test/test_logging.rb +0 -34
  111. data/test/test_manager.rb +0 -168
  112. data/test/test_middleware.rb +0 -159
  113. data/test/test_processor.rb +0 -237
  114. data/test/test_rails.rb +0 -21
  115. data/test/test_redis_connection.rb +0 -126
  116. data/test/test_retry.rb +0 -325
  117. data/test/test_scheduled.rb +0 -114
  118. data/test/test_scheduling.rb +0 -49
  119. data/test/test_sidekiq.rb +0 -99
  120. data/test/test_testing.rb +0 -142
  121. data/test/test_testing_fake.rb +0 -268
  122. data/test/test_testing_inline.rb +0 -93
  123. data/test/test_util.rb +0 -16
  124. data/test/test_web.rb +0 -608
  125. data/test/test_web_helpers.rb +0 -53
  126. data/web/assets/images/bootstrap/glyphicons-halflings-white.png +0 -0
  127. data/web/assets/images/bootstrap/glyphicons-halflings.png +0 -0
  128. data/web/assets/images/status/active.png +0 -0
  129. data/web/assets/images/status/idle.png +0 -0
  130. data/web/assets/javascripts/locales/README.md +0 -27
  131. data/web/assets/javascripts/locales/jquery.timeago.ar.js +0 -96
  132. data/web/assets/javascripts/locales/jquery.timeago.bg.js +0 -18
  133. data/web/assets/javascripts/locales/jquery.timeago.bs.js +0 -49
  134. data/web/assets/javascripts/locales/jquery.timeago.ca.js +0 -18
  135. data/web/assets/javascripts/locales/jquery.timeago.cs.js +0 -18
  136. data/web/assets/javascripts/locales/jquery.timeago.cy.js +0 -20
  137. data/web/assets/javascripts/locales/jquery.timeago.da.js +0 -18
  138. data/web/assets/javascripts/locales/jquery.timeago.de.js +0 -18
  139. data/web/assets/javascripts/locales/jquery.timeago.el.js +0 -18
  140. data/web/assets/javascripts/locales/jquery.timeago.en-short.js +0 -20
  141. data/web/assets/javascripts/locales/jquery.timeago.en.js +0 -20
  142. data/web/assets/javascripts/locales/jquery.timeago.es.js +0 -18
  143. data/web/assets/javascripts/locales/jquery.timeago.et.js +0 -18
  144. data/web/assets/javascripts/locales/jquery.timeago.fa.js +0 -22
  145. data/web/assets/javascripts/locales/jquery.timeago.fi.js +0 -28
  146. data/web/assets/javascripts/locales/jquery.timeago.fr-short.js +0 -16
  147. data/web/assets/javascripts/locales/jquery.timeago.fr.js +0 -17
  148. data/web/assets/javascripts/locales/jquery.timeago.he.js +0 -18
  149. data/web/assets/javascripts/locales/jquery.timeago.hr.js +0 -49
  150. data/web/assets/javascripts/locales/jquery.timeago.hu.js +0 -18
  151. data/web/assets/javascripts/locales/jquery.timeago.hy.js +0 -18
  152. data/web/assets/javascripts/locales/jquery.timeago.id.js +0 -18
  153. data/web/assets/javascripts/locales/jquery.timeago.it.js +0 -16
  154. data/web/assets/javascripts/locales/jquery.timeago.ja.js +0 -19
  155. data/web/assets/javascripts/locales/jquery.timeago.ko.js +0 -17
  156. data/web/assets/javascripts/locales/jquery.timeago.lt.js +0 -20
  157. data/web/assets/javascripts/locales/jquery.timeago.mk.js +0 -20
  158. data/web/assets/javascripts/locales/jquery.timeago.nl.js +0 -20
  159. data/web/assets/javascripts/locales/jquery.timeago.no.js +0 -18
  160. data/web/assets/javascripts/locales/jquery.timeago.pl.js +0 -31
  161. data/web/assets/javascripts/locales/jquery.timeago.pt-br.js +0 -16
  162. data/web/assets/javascripts/locales/jquery.timeago.pt.js +0 -16
  163. data/web/assets/javascripts/locales/jquery.timeago.ro.js +0 -18
  164. data/web/assets/javascripts/locales/jquery.timeago.rs.js +0 -49
  165. data/web/assets/javascripts/locales/jquery.timeago.ru.js +0 -34
  166. data/web/assets/javascripts/locales/jquery.timeago.sk.js +0 -18
  167. data/web/assets/javascripts/locales/jquery.timeago.sl.js +0 -44
  168. data/web/assets/javascripts/locales/jquery.timeago.sv.js +0 -18
  169. data/web/assets/javascripts/locales/jquery.timeago.th.js +0 -20
  170. data/web/assets/javascripts/locales/jquery.timeago.tr.js +0 -16
  171. data/web/assets/javascripts/locales/jquery.timeago.uk.js +0 -34
  172. data/web/assets/javascripts/locales/jquery.timeago.uz.js +0 -19
  173. data/web/assets/javascripts/locales/jquery.timeago.zh-cn.js +0 -20
  174. data/web/assets/javascripts/locales/jquery.timeago.zh-tw.js +0 -20
  175. data/web/views/_poll_js.erb +0 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: d09c0753f21b76f14daf02a88f5490fc1b06858a
4
- data.tar.gz: e7edc849a6a2cd7d471976d770b0f2937eafff98
2
+ SHA256:
3
+ metadata.gz: 408fa69245bc5dbd48894529237ed6bd94fb62f084e12c3cf21c5c2b44466555
4
+ data.tar.gz: 7052699621d277bf59aaee779f93c0f98089a2d0bbc5d40f4d991faa52ef7b90
5
5
  SHA512:
6
- metadata.gz: 50ba2a1930ba127f8f9bebe250184c456ccc5fec7ed64df338fab31ce741bfe518e594e3b21eced6fe88d87ed622214ee5a99382f7d13f02ef782c25a25f798b
7
- data.tar.gz: 06c9547502b98dbc17ab95d32e6313d7121fa6072e4fb78c63b84380390a4dec17cff796fa3b57a4f27437ea011b999beca61b59e5be1cd2f28a56df58cde918
6
+ metadata.gz: e128875c94c37f82fec77c4071e6abafd5326a1a949bff0ff90377d6a54c18b117a7753c439e7d9611e87dfc57c752251f6b2bf3cfb1c799d95016d2a112a211
7
+ data.tar.gz: 5aabe50f97494052e73190fb8aa96f57b253e5855416938ef0644013012678640d620c8e05484c4d945ea558d55413c7c1625967ab40f402680b7ded27133321
@@ -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"
@@ -0,0 +1,11 @@
1
+ Ruby version:
2
+ Sidekiq / Pro / Enterprise version(s):
3
+
4
+ Please include your initializer and any error message with the full backtrace.
5
+
6
+ Are you using an old version?
7
+ Have you checked the changelogs to see if your issue has been fixed in a later version?
8
+
9
+ https://github.com/mperham/sidekiq/blob/master/Changes.md
10
+ https://github.com/mperham/sidekiq/blob/master/Pro-Changes.md
11
+ https://github.com/mperham/sidekiq/blob/master/Ent-Changes.md
data/.gitignore CHANGED
@@ -2,6 +2,7 @@
2
2
  .ruby-version
3
3
  tags
4
4
  Gemfile.lock
5
+ gemfiles/*.lock
5
6
  *.swp
6
7
  dump.rdb
7
8
  .rbx
@@ -10,3 +11,5 @@ vendor/
10
11
  .bundle/
11
12
  .sass-cache/
12
13
  tmp/
14
+ pkg/*.gem
15
+ .byebug_history
@@ -4,13 +4,8 @@ cache: bundler
4
4
  services:
5
5
  - redis-server
6
6
  rvm:
7
- - 2.1
8
- - 2.0.0
9
- - 2.2
10
- - jruby
11
- - jruby-head
12
- - rbx-2
13
- matrix:
14
- allow_failures:
15
- - rvm: rbx-2
16
- - rvm: jruby-head
7
+ - 2.3.7
8
+ - 2.4.4
9
+ - 2.5.1
10
+ - 2.6.0
11
+ - jruby-9.2.6.0
@@ -0,0 +1,53 @@
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
+ * Worker data is no longer updated in real-time but rather upon every
29
+ heartbeat. Don't expect the `Sidekiq::Workers` API to be millisecond-precise.
30
+
31
+ * There's a new testing API based off the `Sidekiq::Queues` namespace. All
32
+ assertions made against the Worker class still work as expected.
33
+ ```ruby
34
+ assert_equal 0, Sidekiq::Queues["default"].size
35
+ HardWorker.perform_async("log")
36
+ assert_equal 1, Sidekiq::Queues["default"].size
37
+ assert_equal "log", Sidekiq::Queues["default"].first['args'][0]
38
+ Sidekiq::Queues.clear_all
39
+ ```
40
+
41
+ ## Upgrade
42
+
43
+ First, make sure you are using Redis 2.8 or greater. Next:
44
+
45
+ * Upgrade to the latest Sidekiq 3.x.
46
+ ```ruby
47
+ gem 'sidekiq', '< 4'
48
+ ```
49
+ * Fix any deprecation warnings you see.
50
+ * Upgrade to 4.x.
51
+ ```ruby
52
+ gem 'sidekiq', '< 5'
53
+ ```
@@ -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
+ ```
@@ -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
 
@@ -28,21 +30,21 @@ In order to use the Software under this Agreement, you must receive a “Source
28
30
 
29
31
  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
32
 
31
- 3.2 UNDER NO CIRCUMSTANCES MAY YOU USE THE SOFTWARE FOR A PRODUCT THAT IS INTENDED FOR SOFTWARE OR APPLICATION DEVELOPMENT PURPOSES.
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,5 +1,380 @@
1
1
  # Sidekiq Changes
2
2
 
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
+ 5.2.7
6
+ ---------
7
+
8
+ - Fix stale `enqueued_at` when retrying [#4149]
9
+ - Move build to [Circle CI](https://circleci.com/gh/mperham/sidekiq) [#4120]
10
+
11
+ 5.2.6
12
+ ---------
13
+
14
+ - Fix edge case where a job failure during Redis outage could result in a lost job [#4141]
15
+ - Better handling of malformed job arguments in payload [#4095]
16
+ - Restore bootstap's dropdown css component [#4099, urkle]
17
+ - Display human-friendly time diff for longer queue latencies [#4111, interlinked]
18
+ - Allow `Sidekiq::Worker#set` to be chained
19
+
20
+ 5.2.5
21
+ ---------
22
+
23
+ - Fix default usage of `config/sidekiq.yml` [#4077, Tensho]
24
+
25
+ 5.2.4
26
+ ---------
27
+
28
+ - Add warnings for various deprecations and changes coming in Sidekiq 6.0.
29
+ See the 6-0 branch. [#4056]
30
+ - Various improvements to the Sidekiq test suite and coverage [#4026, #4039, Tensho]
31
+
32
+ 5.2.3
33
+ ---------
34
+
35
+ - Warning message on invalid REDIS\_PROVIDER [#3970]
36
+ - Add `sidekiqctl status` command [#4003, dzunk]
37
+ - Update elapsed time calculatons to use monotonic clock [#3999]
38
+ - Fix a few issues with mobile Web UI styling [#3973, navied]
39
+ - Jobs with `retry: false` now go through the global `death_handlers`,
40
+ meaning you can take action on failed ephemeral jobs. [#3980, Benjamin-Dobell]
41
+ - Fix race condition in defining Workers. [#3997, mattbooks]
42
+
43
+ 5.2.2
44
+ ---------
45
+
46
+ - Raise error for duplicate queue names in config to avoid unexpected fetch algorithm change [#3911]
47
+ - Fix concurrency bug on JRuby [#3958, mattbooks]
48
+ - Add "Kill All" button to the retries page [#3938]
49
+
50
+ 5.2.1
51
+ -----------
52
+
53
+ - Fix concurrent modification error during heartbeat [#3921]
54
+
55
+ 5.2.0
56
+ -----------
57
+
58
+ - **Decrease default concurrency from 25 to 10** [#3892]
59
+ - Verify connection pool sizing upon startup [#3917]
60
+ - Smoother scheduling for large Sidekiq clusters [#3889]
61
+ - Switch Sidekiq::Testing impl from alias\_method to Module#prepend, for resiliency [#3852]
62
+ - Update Sidekiq APIs to use SCAN for scalability [#3848, ffiller]
63
+ - Remove concurrent-ruby gem dependency [#3830]
64
+ - Optimize Web UI's bootstrap.css [#3914]
65
+
66
+ 5.1.3
67
+ -----------
68
+
69
+ - Fix version comparison so Ruby 2.2.10 works. [#3808, nateberkopec]
70
+
71
+ 5.1.2
72
+ -----------
73
+
74
+ - Add link to docs in Web UI footer
75
+ - Fix crash on Ctrl-C in Windows [#3775, Bernica]
76
+ - Remove `freeze` calls on String constants. This is superfluous with Ruby
77
+ 2.3+ and `frozen_string_literal: true`. [#3759]
78
+ - Fix use of AR middleware outside of Rails [#3787]
79
+ - Sidekiq::Worker `sidekiq_retry_in` block can now return nil or 0 to use
80
+ the default backoff delay [#3796, dsalahutdinov]
81
+
82
+ 5.1.1
83
+ -----------
84
+
85
+ - Fix Web UI incompatibility with Redis 3.x gem [#3749]
86
+
87
+ 5.1.0
88
+ -----------
89
+
90
+ - **NEW** Global death handlers - called when your job exhausts all
91
+ retries and dies. Now you can take action when a job fails permanently. [#3721]
92
+ - **NEW** Enable ActiveRecord query cache within jobs by default [#3718, sobrinho]
93
+ This will prevent duplicate SELECTS; cache is cleared upon any UPDATE/INSERT/DELETE.
94
+ See the issue for how to bypass the cache or disable it completely.
95
+ - Scheduler timing is now more accurate, 15 -> 5 seconds [#3734]
96
+ - Exceptions during the :startup event will now kill the process [#3717]
97
+ - Make `Sidekiq::Client.via` reentrant [#3715]
98
+ - Fix use of Sidekiq logger outside of the server process [#3714]
99
+ - Tweak `constantize` to better match Rails class lookup. [#3701, caffeinated-tech]
100
+
101
+ 5.0.5
102
+ -----------
103
+
104
+ - Update gemspec to allow newer versions of the Redis gem [#3617]
105
+ - Refactor Worker.set so it can be memoized [#3602]
106
+ - Fix display of Redis URL in web footer, broken in 5.0.3 [#3560]
107
+ - Update `Sidekiq::Job#display_args` to avoid mutation [#3621]
108
+
109
+ 5.0.4
110
+ -----------
111
+
112
+ - Fix "slow startup" performance regression from 5.0.2. [#3525]
113
+ - Allow users to disable ID generation since some redis providers disable the CLIENT command. [#3521]
114
+
115
+ 5.0.3
116
+ -----------
117
+
118
+ - Fix overriding `class_attribute` core extension from ActiveSupport with Sidekiq one [PikachuEXE, #3499]
119
+ - Allow job logger to be overridden [AlfonsoUceda, #3502]
120
+ - Set a default Redis client identifier for debugging [#3516]
121
+ - Fix "Uninitialized constant" errors on startup with the delayed extensions [#3509]
122
+
123
+ 5.0.2
124
+ -----------
125
+
126
+ - fix broken release, thanks @nateberkopec
127
+
128
+ 5.0.1
129
+ -----------
130
+
131
+ - Fix incorrect server identity when daemonizing [jwilm, #3496]
132
+ - Work around error running Web UI against Redis Cluster [#3492]
133
+ - Remove core extensions, Sidekiq is now monkeypatch-free! [#3474]
134
+ - Reimplement Web UI's HTTP\_ACCEPT\_LANGUAGE parsing because the spec is utterly
135
+ incomprehensible for various edge cases. [johanlunds, natematykiewicz, #3449]
136
+ - Update `class_attribute` core extension to avoid warnings
137
+ - Expose `job_hash_context` from `Sidekiq::Logging` to support log customization
138
+
139
+ 5.0.0
140
+ -----------
141
+
142
+ - **BREAKING CHANGE** Job dispatch was refactored for safer integration with
143
+ Rails 5. The **Logging** and **RetryJobs** server middleware were removed and
144
+ functionality integrated directly into Sidekiq::Processor. These aren't
145
+ commonly used public APIs so this shouldn't impact most users.
146
+ ```
147
+ Sidekiq::Middleware::Server::RetryJobs -> Sidekiq::JobRetry
148
+ Sidekiq::Middleware::Server::Logging -> Sidekiq::JobLogger
149
+ ```
150
+ - Quieting Sidekiq is now done via the TSTP signal, the USR1 signal is deprecated.
151
+ - The `delay` extension APIs are no longer available by default, you
152
+ must opt into them.
153
+ - The Web UI is now BiDi and can render RTL languages like Arabic, Farsi and Hebrew.
154
+ - Rails 3.2 and Ruby 2.0 and 2.1 are no longer supported.
155
+ - The `SomeWorker.set(options)` API was re-written to avoid thread-local state. [#2152]
156
+ - Sidekiq Enterprise's encrypted jobs now display "[encrypted data]" in the Web UI instead
157
+ of random hex bytes.
158
+ - Please see the [5.0 Upgrade notes](5.0-Upgrade.md) for more detail.
159
+
160
+ 4.2.10
161
+ -----------
162
+
163
+ - Scheduled jobs can now be moved directly to the Dead queue via API [#3390]
164
+ - Fix edge case leading to job duplication when using Sidekiq Pro's
165
+ reliability feature [#3388]
166
+ - Fix error class name display on retry page [#3348]
167
+ - More robust latency calculation [#3340]
168
+
169
+ 4.2.9
170
+ -----------
171
+
172
+ - Rollback [#3303] which broke Heroku Redis users [#3311]
173
+ - Add support for TSTP signal, for Sidekiq 5.0 forward compatibility. [#3302]
174
+
175
+ 4.2.8
176
+ -----------
177
+
178
+ - Fix rare edge case with Redis driver that can create duplicate jobs [#3303]
179
+ - Fix Rails 5 loading issue [#3275]
180
+ - Restore missing tooltips to timestamps in Web UI [#3310]
181
+ - Work on **Sidekiq 5.0** is now active! [#3301]
182
+
183
+ 4.2.7
184
+ -----------
185
+
186
+ - Add new integration testing to verify code loading and job execution
187
+ in development and production modes with Rails 4 and 5 [#3241]
188
+ - Fix delayed extensions in development mode [#3227, DarthSim]
189
+ - Use Worker's `retry` default if job payload does not have a retry
190
+ attribute [#3234, mlarraz]
191
+
192
+ 4.2.6
193
+ -----------
194
+
195
+ - Run Rails Executor when in production [#3221, eugeneius]
196
+
197
+ 4.2.5
198
+ -----------
199
+
200
+ - Re-enable eager loading of all code when running non-development Rails 5. [#3203]
201
+ - Better root URL handling for zany web servers [#3207]
202
+
203
+ 4.2.4
204
+ -----------
205
+
206
+ - Log errors coming from the Rails 5 reloader. [#3212, eugeneius]
207
+ - Clone job data so middleware changes don't appear in Busy tab
208
+
209
+ 4.2.3
210
+ -----------
211
+
212
+ - Disable use of Rails 5's Reloader API in non-development modes, it has proven
213
+ to be unstable under load [#3154]
214
+ - Allow disabling of Sidekiq::Web's cookie session to handle the
215
+ case where the app provides a session already [#3180, inkstak]
216
+ ```ruby
217
+ Sidekiq::Web.set :sessions, false
218
+ ```
219
+ - Fix Web UI sharding support broken in 4.2.2. [#3169]
220
+ - Fix timestamps not updating during UI polling [#3193, shaneog]
221
+ - Relax rack-protection version to >= 1.5.0
222
+ - Provide consistent interface to exception handlers, changing the structure of the context hash. [#3161]
223
+
224
+ 4.2.2
225
+ -----------
226
+
227
+ - Fix ever-increasing cookie size with nginx [#3146, cconstantine]
228
+ - Fix so Web UI works without trailing slash [#3158, timdorr]
229
+
230
+ 4.2.1
231
+ -----------
232
+
233
+ - Ensure browser does not cache JSON/AJAX responses. [#3136]
234
+ - Support old Sinatra syntax for setting config [#3139]
235
+
236
+ 4.2.0
237
+ -----------
238
+
239
+ - Enable development-mode code reloading. **With Rails 5.0+, you don't need
240
+ to restart Sidekiq to pick up your Sidekiq::Worker changes anymore!** [#2457]
241
+ - **Remove Sinatra dependency**. Sidekiq's Web UI now uses Rack directly.
242
+ Thank you to Sidekiq's newest committer, **badosu**, for writing the code
243
+ and doing a lot of testing to ensure compatibility with many different
244
+ 3rd party plugins. If your Web UI works with 4.1.4 but fails with
245
+ 4.2.0, please open an issue. [#3075]
246
+ - Allow tuning of concurrency with the `RAILS_MAX_THREADS` env var. [#2985]
247
+ This is the same var used by Puma so you can tune all of your systems
248
+ the same way:
249
+ ```sh
250
+ web: RAILS_MAX_THREADS=5 bundle exec puma ...
251
+ worker: RAILS_MAX_THREADS=10 bundle exec sidekiq ...
252
+ ```
253
+ Using `-c` or `config/sidekiq.yml` overrides this setting. I recommend
254
+ adjusting your `config/database.yml` to use it too so connections are
255
+ auto-scaled:
256
+ ```yaml
257
+ pool: <%= ENV['RAILS_MAX_THREADS'] || 5 %>
258
+ ```
259
+
260
+ 4.1.4
261
+ -----------
262
+
263
+ - Unlock Sinatra so a Rails 5.0 compatible version may be used [#3048]
264
+ - Fix race condition on startup with JRuby [#3043]
265
+
266
+
267
+ 4.1.3
268
+ -----------
269
+
270
+ - Please note the Redis 3.3.0 gem has a [memory leak](https://github.com/redis/redis-rb/issues/612),
271
+ Redis 3.2.2 is recommended until that issue is fixed.
272
+ - Sinatra 1.4.x is now a required dependency, avoiding cryptic errors
273
+ and old bugs due to people not upgrading Sinatra for years. [#3042]
274
+ - Fixed race condition in heartbeat which could rarely lead to lingering
275
+ processes on the Busy tab. [#2982]
276
+ ```ruby
277
+ # To clean up lingering processes, modify this as necessary to connect to your Redis.
278
+ # After 60 seconds, lingering processes should disappear from the Busy page.
279
+
280
+ require 'redis'
281
+ r = Redis.new(url: "redis://localhost:6379/0")
282
+ # uncomment if you need a namespace
283
+ #require 'redis-namespace'
284
+ #r = Redis::Namespace.new("foo", r)
285
+ r.smembers("processes").each do |pro|
286
+ r.expire(pro, 60)
287
+ r.expire("#{pro}:workers", 60)
288
+ end
289
+ ```
290
+
291
+
292
+ 4.1.2
293
+ -----------
294
+
295
+ - Fix Redis data leak with worker data when a busy Sidekiq process
296
+ crashes. You can find and expire leaked data in Redis with this
297
+ script:
298
+ ```bash
299
+ $ redis-cli keys "*:workers" | while read LINE ; do TTL=`redis-cli expire "$LINE" 60`; echo "$LINE"; done;
300
+ ```
301
+ Please note that `keys` can be dangerous to run on a large, busy Redis. Caveat runner.
302
+ - Freeze all string literals with Ruby 2.3. [#2741]
303
+ - Client middleware can now stop bulk job push. [#2887]
304
+
305
+ 4.1.1
306
+ -----------
307
+
308
+ - Much better behavior when Redis disappears and comes back. [#2866]
309
+ - Update FR locale [dbachet]
310
+ - Don't fill logfile in case of Redis downtime [#2860]
311
+ - Allow definition of a global retries_exhausted handler. [#2807]
312
+ ```ruby
313
+ Sidekiq.configure_server do |config|
314
+ config.default_retries_exhausted = -> (job, ex) do
315
+ Sidekiq.logger.info "#{job['class']} job is now dead"
316
+ end
317
+ end
318
+ ```
319
+
320
+ 4.1.0
321
+ -----------
322
+
323
+ - Tag quiet processes in the Web UI [#2757, jcarlson]
324
+ - Pass last exception to sidekiq\_retries\_exhausted block [#2787, Nowaker]
325
+ ```ruby
326
+ class MyWorker
327
+ include Sidekiq::Worker
328
+ sidekiq_retries_exhausted do |job, exception|
329
+ end
330
+ end
331
+ ```
332
+ - Add native support for ActiveJob's `set(options)` method allowing
333
+ you to override worker options dynamically. This should make it
334
+ even easier to switch between ActiveJob and Sidekiq's native APIs [#2780]
335
+ ```ruby
336
+ class MyWorker
337
+ include Sidekiq::Worker
338
+ sidekiq_options queue: 'default', retry: true
339
+
340
+ def perform(*args)
341
+ # do something
342
+ end
343
+ end
344
+
345
+ MyWorker.set(queue: 'high', retry: false).perform_async(1)
346
+ ```
347
+
348
+ 4.0.2
349
+ -----------
350
+
351
+ - Better Japanese translations
352
+ - Remove `json` gem dependency from gemspec. [#2743]
353
+ - There's a new testing API based off the `Sidekiq::Queues` namespace. All
354
+ assertions made against the Worker class still work as expected.
355
+ [#2676, brandonhilkert]
356
+ ```ruby
357
+ assert_equal 0, Sidekiq::Queues["default"].size
358
+ HardWorker.perform_async("log")
359
+ assert_equal 1, Sidekiq::Queues["default"].size
360
+ assert_equal "log", Sidekiq::Queues["default"].first['args'][0]
361
+ Sidekiq::Queues.clear_all
362
+ ```
363
+
364
+ 4.0.1
365
+ -----------
366
+
367
+ - Yank new queue-based testing API [#2663]
368
+ - Fix invalid constant reference in heartbeat
369
+
370
+ 4.0.0
371
+ -----------
372
+
373
+ - Sidekiq's internals have been completely overhauled for performance
374
+ and to remove dependencies. This has resulted in major speedups, as
375
+ [detailed on my blog](http://www.mikeperham.com/2015/10/14/optimizing-sidekiq/).
376
+ - See the [4.0 upgrade notes](4.0-Upgrade.md) for more detail.
377
+
3
378
  3.5.4
4
379
  -----------
5
380
 
@@ -33,7 +408,7 @@
33
408
  -----------
34
409
 
35
410
  - **FIX MEMORY LEAK** Under rare conditions, threads may leak [#2598, gazay]
36
- - Add Ukranian locale [#2561, elrakita]
411
+ - Add Ukrainian locale [#2561, elrakita]
37
412
  - Disconnect and retry Redis operations if we see a READONLY error [#2550]
38
413
  - Add server middleware testing harness; see [wiki](https://github.com/mperham/sidekiq/wiki/Testing#testing-server-middleware) [#2534, ryansch]
39
414