rack-timeout 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 45a8b583f5c8ec73b0659348e53083fd449d1ae732c020c45ab3decfd4d7c913
4
- data.tar.gz: 832b443cc5678f0c55df7a8c741dc2f5304e024da77f021ecbaa352c03279e51
3
+ metadata.gz: fafa5a90f1af90fdcc6ce081752ba684aac2652c1fd31867274ab9fc01a7c778
4
+ data.tar.gz: 6b3f1a800e031218a1e026737614b9d087d037c9ae8407ef788b3f2d404cb50a
5
5
  SHA512:
6
- metadata.gz: 2279854e2ca96bc0fa0c9e6fe4a67a4d217f79df5840b59cf36b97518ddab7823a134c15fe1e527ce1a24972ee9113825bb58d52520accdcb7dc2a3d8147cb16
7
- data.tar.gz: 00651f0c2e2449d490e88db4cf7d899f1287f22bc531fc4c22270024790635b552119572847de65a1933a5b7e4e6514c530a33b0689c02d6aeb34e73de392245
6
+ metadata.gz: 9390e4bb587d82e2ae0574397f9e02d61c5a13e162d980ad972d174f158d43a241949fdc77ae34d4206f01ec2dbd92d9c66d6bdb886ed4065dace963daf30b15
7
+ data.tar.gz: e4d838274207478d4ca0767bac9b702640aebdaada4ca2aa4f077fc79c23d4c34ab7744d2b3af44c58479cf5ad1a09e3c11e241add93eb6f5c906883c7dd4291
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.6.1
2
+
3
+ - RACK_TIMEOUT_TERM_ON_TIMEOUT can be set to zero to disable (https://github.com/sharpstone/rack-timeout/pull/161)
4
+
1
5
  ## 0.6.0
2
6
 
3
7
  - Allow sending SIGTERM to workers on timeout (https://github.com/sharpstone/rack-timeout/pull/157)
data/README.md CHANGED
@@ -114,5 +114,5 @@ for Rails apps, Rails 3.x and up.
114
114
 
115
115
 
116
116
  ---
117
- Copyright © 2010-2016 Caio Chassot, released under the MIT license
118
- <http://github.com/heroku/rack-timeout>
117
+ Copyright © 2010-2020 Caio Chassot, released under the MIT license
118
+ <http://github.com/sharpstone/rack-timeout>
data/doc/settings.md CHANGED
@@ -59,7 +59,7 @@ If your application timeouts fire frequently then [they can cause your applicati
59
59
 
60
60
  After the worker process exists will Puma's parent process know to boot a replacement worker. While one process is restarting, another can still serve requests (if you have more than 1 worker process per server/dyno). Between when a process exits and when a new process boots, there will be a reduction in throughput. If all processes are restarting, then incoming requests will be blocked while new processes boot.
61
61
 
62
- **How to enable** To enable this behavior you can set `term_on_timeout: 1` to an integer value. If you set it to zero or one, then the first time the process encounters a timeout, it will receive a SIGTERM.
62
+ **How to enable** To enable this behavior you can set `term_on_timeout: 1` to an integer value. If you set it to one, then the first time the process encounters a timeout, it will receive a SIGTERM.
63
63
 
64
64
  To enable on Heroku run:
65
65
 
@@ -53,8 +53,6 @@ module Rack
53
53
  when nil ; read_timeout_property default, default
54
54
  when false ; false
55
55
  when 0 ; false
56
- when String
57
- read_timeout_property value.to_i, default
58
56
  else
59
57
  value.is_a?(Numeric) && value > 0 or raise ArgumentError, "value #{value.inspect} should be false, zero, or a positive number."
60
58
  value
@@ -69,7 +67,7 @@ module Rack
69
67
  :term_on_timeout
70
68
 
71
69
  def initialize(app, service_timeout:nil, wait_timeout:nil, wait_overtime:nil, service_past_wait:"not_specified", term_on_timeout: nil)
72
- @term_on_timeout = read_timeout_property term_on_timeout, ENV.fetch("RACK_TIMEOUT_TERM_ON_TIMEOUT", false)
70
+ @term_on_timeout = read_timeout_property term_on_timeout, ENV.fetch("RACK_TIMEOUT_TERM_ON_TIMEOUT", 0).to_i
73
71
  @service_timeout = read_timeout_property service_timeout, ENV.fetch("RACK_TIMEOUT_SERVICE_TIMEOUT", 15).to_i
74
72
  @wait_timeout = read_timeout_property wait_timeout, ENV.fetch("RACK_TIMEOUT_WAIT_TIMEOUT", 30).to_i
75
73
  @wait_overtime = read_timeout_property wait_overtime, ENV.fetch("RACK_TIMEOUT_WAIT_OVERTIME", 60).to_i
@@ -77,7 +75,6 @@ module Rack
77
75
 
78
76
  Thread.main['RACK_TIMEOUT_COUNT'] ||= 0
79
77
  if @term_on_timeout
80
- raise "term_on_timeout must be an integer but is #{@term_on_timeout.class}: #{@term_on_timeout}" unless @term_on_timeout.is_a?(Numeric)
81
78
  raise "Current Runtime does not support processes" unless ::Process.respond_to?(:fork)
82
79
  end
83
80
  @app = app
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-timeout
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Caio Chassot
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-11 00:00:00.000000000 Z
11
+ date: 2022-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -91,10 +91,10 @@ licenses:
91
91
  - MIT
92
92
  metadata:
93
93
  bug_tracker_uri: https://github.com/sharpstone/rack-timeout/issues
94
- changelog_uri: https://github.com/sharpstone/rack-timeout/blob/v0.6.0/CHANGELOG.md
95
- documentation_uri: https://rubydoc.info/gems/rack-timeout/0.6.0/
94
+ changelog_uri: https://github.com/sharpstone/rack-timeout/blob/v0.6.1/CHANGELOG.md
95
+ documentation_uri: https://rubydoc.info/gems/rack-timeout/0.6.1/
96
96
  source_code_uri: https://github.com/sharpstone/rack-timeout
97
- post_install_message:
97
+ post_install_message:
98
98
  rdoc_options: []
99
99
  require_paths:
100
100
  - lib
@@ -109,8 +109,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  requirements: []
112
- rubygems_version: 3.0.6
113
- signing_key:
112
+ rubygems_version: 3.3.7
113
+ signing_key:
114
114
  specification_version: 4
115
115
  summary: Abort requests that are taking too long
116
116
  test_files: