async-container 0.34.1 → 0.34.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/async/container/controller.rb +3 -3
- data/lib/async/container/generic.rb +0 -2
- data/lib/async/container/group.rb +0 -30
- data/lib/async/container/statistics.rb +1 -1
- data/lib/async/container/version.rb +1 -1
- data/readme.md +8 -8
- data/releases.md +8 -0
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 977328d9a4dc6b4b7c86f634de0dba5f97b6e9da9c404b39ba1beea29f5711cc
|
|
4
|
+
data.tar.gz: 766a0c91a80afa6e3867ecdaae4bcfc8fb75dde5a6e9d12a3c2afe29790d4e9b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: deb356cc50190aaa1a766e1eb53f4f573d2ca07c766f5b8549ebec923d6c5b451c4f9b371864ef83313d1e66658c52cbb11cc3c6196da4b0608d2a0e7e08d25a
|
|
7
|
+
data.tar.gz: 456c21fa8ac6df624ee6558ab0935ab3d6175722908c815d0a726cced3de8708029053ba76268b1e8bc7a7e7fa185c474dcbc27ded2405ec164fe1e81246c19a
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
|
@@ -111,7 +111,7 @@ module Async
|
|
|
111
111
|
self.restart
|
|
112
112
|
end
|
|
113
113
|
|
|
114
|
-
Console.info(self, "Controller started
|
|
114
|
+
Console.info(self, "Controller started.")
|
|
115
115
|
end
|
|
116
116
|
|
|
117
117
|
# Stop the container if it's running.
|
|
@@ -163,7 +163,7 @@ module Async
|
|
|
163
163
|
old_container&.stop(@graceful_stop)
|
|
164
164
|
end
|
|
165
165
|
|
|
166
|
-
@notify&.ready!(size: @container.size)
|
|
166
|
+
@notify&.ready!(size: @container.size, status: "Running with #{@container.size} children.")
|
|
167
167
|
rescue => error
|
|
168
168
|
raise
|
|
169
169
|
ensure
|
|
@@ -196,7 +196,7 @@ module Async
|
|
|
196
196
|
|
|
197
197
|
raise SetupError, @container
|
|
198
198
|
else
|
|
199
|
-
@notify&.ready!
|
|
199
|
+
@notify&.ready!(size: @container.size, status: "Running with #{@container.size} children.")
|
|
200
200
|
end
|
|
201
201
|
end
|
|
202
202
|
|
|
@@ -35,9 +35,6 @@ module Async
|
|
|
35
35
|
|
|
36
36
|
# The running fibers, indexed by IO:
|
|
37
37
|
@running = {}
|
|
38
|
-
|
|
39
|
-
# This queue allows us to wait for processes to complete, without spawning new processes as a result.
|
|
40
|
-
@queue = nil
|
|
41
38
|
end
|
|
42
39
|
|
|
43
40
|
# @returns [String] A human-readable representation of the group.
|
|
@@ -73,16 +70,11 @@ module Async
|
|
|
73
70
|
|
|
74
71
|
# Sleep for at most the specified duration until some state change occurs.
|
|
75
72
|
def sleep(duration)
|
|
76
|
-
self.resume
|
|
77
|
-
self.suspend
|
|
78
|
-
|
|
79
73
|
self.wait_for_children(duration)
|
|
80
74
|
end
|
|
81
75
|
|
|
82
76
|
# Begin any outstanding queued processes and wait for them indefinitely.
|
|
83
77
|
def wait
|
|
84
|
-
self.resume
|
|
85
|
-
|
|
86
78
|
with_health_checks do |duration|
|
|
87
79
|
self.wait_for_children(duration)
|
|
88
80
|
end
|
|
@@ -256,28 +248,6 @@ module Async
|
|
|
256
248
|
return readable
|
|
257
249
|
end
|
|
258
250
|
end
|
|
259
|
-
|
|
260
|
-
def yield
|
|
261
|
-
if @queue
|
|
262
|
-
fiber = Fiber.current
|
|
263
|
-
|
|
264
|
-
@queue << fiber
|
|
265
|
-
Fiber.yield
|
|
266
|
-
end
|
|
267
|
-
end
|
|
268
|
-
|
|
269
|
-
def suspend
|
|
270
|
-
@queue ||= []
|
|
271
|
-
end
|
|
272
|
-
|
|
273
|
-
def resume
|
|
274
|
-
if @queue
|
|
275
|
-
queue = @queue
|
|
276
|
-
@queue = nil
|
|
277
|
-
|
|
278
|
-
queue.each(&:resume)
|
|
279
|
-
end
|
|
280
|
-
end
|
|
281
251
|
end
|
|
282
252
|
end
|
|
283
253
|
end
|
data/readme.md
CHANGED
|
@@ -28,6 +28,14 @@ Please see the [project documentation](https://socketry.github.io/async-containe
|
|
|
28
28
|
|
|
29
29
|
Please see the [project releases](https://socketry.github.io/async-container/releases/index) for all releases.
|
|
30
30
|
|
|
31
|
+
### v0.34.3
|
|
32
|
+
|
|
33
|
+
- `Controller#restart` and `Controller#reload` now include a `status:` message in the `ready!` notification, so `systemctl status` shows "Running with N children." instead of the stale "Initializing controller..." message.
|
|
34
|
+
|
|
35
|
+
### v0.34.2
|
|
36
|
+
|
|
37
|
+
- Once a container is stopped, it stays stopped.
|
|
38
|
+
|
|
31
39
|
### v0.34.0
|
|
32
40
|
|
|
33
41
|
- Add `Async::Container::Generic#stopping?` so that policies can more accurately track the state of the container.
|
|
@@ -65,14 +73,6 @@ Please see the [project releases](https://socketry.github.io/async-container/rel
|
|
|
65
73
|
- Add `startup_timeout` parameter to `spawn` and `run` methods for detecting processes that hang during startup and never become ready.
|
|
66
74
|
- Health check timeout now only applies after a process becomes ready, preventing premature timeouts for slow-starting applications.
|
|
67
75
|
|
|
68
|
-
### v0.27.5
|
|
69
|
-
|
|
70
|
-
- Make the child handling more robust in the face of exceptions.
|
|
71
|
-
|
|
72
|
-
### v0.27.4
|
|
73
|
-
|
|
74
|
-
- Fix race condition where `wait_for` could modify `@running` while it was being iterated over (`each_value`) during health checks.
|
|
75
|
-
|
|
76
76
|
## Contributing
|
|
77
77
|
|
|
78
78
|
We welcome contributions to this project.
|
data/releases.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Releases
|
|
2
2
|
|
|
3
|
+
## v0.34.3
|
|
4
|
+
|
|
5
|
+
- `Controller#restart` and `Controller#reload` now include a `status:` message in the `ready!` notification, so `systemctl status` shows "Running with N children." instead of the stale "Initializing controller..." message.
|
|
6
|
+
|
|
7
|
+
## v0.34.2
|
|
8
|
+
|
|
9
|
+
- Once a container is stopped, it stays stopped.
|
|
10
|
+
|
|
3
11
|
## v0.34.0
|
|
4
12
|
|
|
5
13
|
- Add `Async::Container::Generic#stopping?` so that policies can more accurately track the state of the container.
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: async-container
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.34.
|
|
4
|
+
version: 0.34.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Samuel Williams
|
|
@@ -100,7 +100,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
100
100
|
requirements:
|
|
101
101
|
- - ">="
|
|
102
102
|
- !ruby/object:Gem::Version
|
|
103
|
-
version: '3.
|
|
103
|
+
version: '3.3'
|
|
104
104
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
105
105
|
requirements:
|
|
106
106
|
- - ">="
|
metadata.gz.sig
CHANGED
|
Binary file
|