falcon 0.44.0 → 0.45.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: deaf700b8a46f5af5e6e1151c0a0708789add0c2e66f4d6048e17da5e7da8c84
4
- data.tar.gz: bac8d213a65f15c4bcc0741e86f357f1158ff2fedacb9480a00ce7ea3498de64
3
+ metadata.gz: 3efd7928dffa871fcd8d93cea1d6204cfb7c4257c80a13710fa512e0f323fa09
4
+ data.tar.gz: 2d8b8ef2ea60c23c07063c23eda943a1824ed6364a41281db4aa4d2e0618e870
5
5
  SHA512:
6
- metadata.gz: 40c405c0e768f68b1a4c56cbf7f155571240b30e8079051243e354596e32db76593929352ca70799d13cedd0fa1fe13afbbfb54edf6d1b0cb0c65d3edf7ea349
7
- data.tar.gz: 9a94416a4b3f82cc34fe61e5b0cf1bdc23ab6c2190ed37d95ff11a9cfb4dfee204c855245d03715cd0d5b63f439451200752240bca2dce58336adc8f84b0c422
6
+ metadata.gz: 591a661365d8a3bde35a9d7639bbd224a355e73fc6ec1731f7a3a70ec9bf2fa016a1e675d1a6690a28c3f157a08a924c19b2b23e00edf8a03ada546eb40643cb
7
+ data.tar.gz: 979aeccb4afda11563b1aa2932d5d7683a487971a319dc537b7c1b7f521de3d6b2a87395ff39c0dd627bfbbabf973e795394551e259dc935ae1d4bba12d61ddd
checksums.yaml.gz.sig CHANGED
Binary file
data/changes.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changes
2
2
 
3
+ # v0.45.0
4
+
5
+ ## Compatibility Fixes
6
+
7
+ During the `v0.44.0` release cycle, the workflows for testing older rack releases were accidentally dropped. As such, `v0.44.0` was not compatible with older versions of rack. This release restores compatibility with older versions of rack.
8
+
9
+ Specifically, `protocol-rack` now provides `Protocol::Rack::Adapter.parse_file` to load Rack applications. Rack 2's `Rack::Builder.parse_file` returns both the application and a set of options (multi-value return). Rack 3 changed this to only return the application, as the prior multi-value return was confusing at best. This change allows `protocol-rack` to work with both versions of rack, and `falcon` adopts that interface.
10
+
11
+ ## Falcon Serve Options
12
+
13
+ In addition, `falcon serve` provides two new options:
14
+
15
+ 1. `--[no]-restart` which controls what happens when `async-container` instances crash. By default, `falcon serve` will restart the container when it crashes. This can be disabled with `--no-restart`.
16
+
17
+ 2. `--graceful-stop [timeout]` which allows you to specify a timeout for graceful shutdown. This is useful when you want to stop the server, but allow existing connections to finish processing before the server stops. This feature is highly experimental and doesn't work correctly in all cases yet, but we are aiming to improve it.
18
+
3
19
  # v0.44.0
4
20
 
5
21
  ## Falcon Host
@@ -42,10 +42,13 @@ module Falcon
42
42
 
43
43
  option '--forks <count>', "Number of forks (hybrid only).", type: Integer
44
44
  option '--threads <count>', "Number of threads (hybrid only).", type: Integer
45
+
46
+ option '--[no]-restart', "Enable/disable automatic restart.", default: true
47
+ option '--graceful-stop <timeout>', "Duration to wait for graceful stop.", type: Float, default: 1.0
45
48
  end
46
49
 
47
50
  def container_options
48
- @options.slice(:count, :forks, :threads)
51
+ @options.slice(:count, :forks, :threads, :restart)
49
52
  end
50
53
 
51
54
  def endpoint_options
@@ -116,7 +119,7 @@ module Falcon
116
119
  buffer.puts "- To reload configuration: kill -HUP #{Process.pid}"
117
120
  end
118
121
 
119
- Async::Service::Controller.run(self.configuration, container_class: self.container_class)
122
+ Async::Service::Controller.run(self.configuration, container_class: self.container_class, graceful_stop: @options[:graceful_stop])
120
123
  end
121
124
  end
122
125
  end
@@ -49,12 +49,6 @@ module Falcon
49
49
  authority: authority
50
50
  )
51
51
  end
52
-
53
- # Number of instances to start.
54
- # @returns [Integer | nil]
55
- def count
56
- nil
57
- end
58
52
  end
59
53
  end
60
54
  end
@@ -11,11 +11,11 @@ module Falcon
11
11
  # Provides an environment for hosting loading a Rackup `config.ru` file.
12
12
  module Rackup
13
13
  def rackup_path
14
- 'config.ru'
14
+ File.expand_path('config.ru', root)
15
15
  end
16
16
 
17
17
  def rack_app
18
- ::Rack::Builder.parse_file(rackup_path)
18
+ ::Protocol::Rack::Adapter.parse_file(rackup_path)
19
19
  end
20
20
 
21
21
  def middleware
@@ -25,9 +25,15 @@ module Falcon
25
25
  self.name
26
26
  end
27
27
 
28
+ # Number of instances to start. By default (when nil), uses `Etc.nprocessors`.
29
+ # @returns [Integer | nil]
30
+ def count
31
+ nil
32
+ end
33
+
28
34
  # Options to use when creating the container.
29
35
  def container_options
30
- {restart: true}
36
+ {restart: true, count: self.count}.compact
31
37
  end
32
38
 
33
39
  # The host that this server will receive connections for.
@@ -4,5 +4,5 @@
4
4
  # Copyright, 2017-2024, by Samuel Williams.
5
5
 
6
6
  module Falcon
7
- VERSION = "0.44.0"
7
+ VERSION = "0.45.1"
8
8
  end
data.tar.gz.sig CHANGED
@@ -1,6 +1,3 @@
1
- CqQm��)�����ז@$5�?g��
2
- 7*(���oRns�<�*��h_ l������~������������~6v��4}��ģ+PZ� _M��#���ے�y�z�����a�C~
3
- ��:�����?U���B .�U��`���L�;߈�,��G)^U���������b*��@-�ViPR
4
- 3�A
5
- &��`x��s��(\�D����Si���
6
- �o�B�����������_7��x:�wN��� i�Q��/G��D����R�� C��Di�;L�
1
+ ,IzD�3�iLO������KWMzZ�+q#�o��}>+ �TְF�� ���,7���M@�_�ؗ��99��c�V��l�<�� �ڃ�dQ�9�+�z��t91/�ǧ"�ً��raT�F�+�G�;�*IC
2
+ |���j+8r����Dsl�Vv�.��1n)|�Ө�M
3
+ �(0����*�B�+l;����fXLn7���\ ���ʩ�*��MH��
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: falcon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.44.0
4
+ version: 0.45.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -57,7 +57,7 @@ cert_chain:
57
57
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
58
58
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
59
59
  -----END CERTIFICATE-----
60
- date: 2024-03-25 00:00:00.000000000 Z
60
+ date: 2024-04-03 00:00:00.000000000 Z
61
61
  dependencies:
62
62
  - !ruby/object:Gem::Dependency
63
63
  name: async
@@ -79,14 +79,14 @@ dependencies:
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0.17'
82
+ version: '0.18'
83
83
  type: :runtime
84
84
  prerelease: false
85
85
  version_requirements: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '0.17'
89
+ version: '0.18'
90
90
  - !ruby/object:Gem::Dependency
91
91
  name: async-http
92
92
  requirement: !ruby/object:Gem::Requirement
@@ -205,28 +205,28 @@ dependencies:
205
205
  requirements:
206
206
  - - "~>"
207
207
  - !ruby/object:Gem::Version
208
- version: '0.1'
208
+ version: '0.5'
209
209
  type: :runtime
210
210
  prerelease: false
211
211
  version_requirements: !ruby/object:Gem::Requirement
212
212
  requirements:
213
213
  - - "~>"
214
214
  - !ruby/object:Gem::Version
215
- version: '0.1'
215
+ version: '0.5'
216
216
  - !ruby/object:Gem::Dependency
217
217
  name: samovar
218
218
  requirement: !ruby/object:Gem::Requirement
219
219
  requirements:
220
220
  - - "~>"
221
221
  - !ruby/object:Gem::Version
222
- version: '2.1'
222
+ version: '2.3'
223
223
  type: :runtime
224
224
  prerelease: false
225
225
  version_requirements: !ruby/object:Gem::Requirement
226
226
  requirements:
227
227
  - - "~>"
228
228
  - !ruby/object:Gem::Version
229
- version: '2.1'
229
+ version: '2.3'
230
230
  description:
231
231
  email:
232
232
  executables:
metadata.gz.sig CHANGED
Binary file