async-container 0.31.1 → 0.32.0
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/generic.rb +1 -1
- data/lib/async/container/policy.rb +10 -6
- data/lib/async/container/statistics.rb +3 -0
- data/lib/async/container/version.rb +1 -1
- data/readme.md +5 -5
- data/releases.md +5 -0
- data.tar.gz.sig +0 -0
- metadata +1 -1
- 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: 063a67f14c61853591e2391b2d4a9c4fcde57c6f2267863cbcf7da92844d4755
|
|
4
|
+
data.tar.gz: ee0b57cf4ab296c3756d997d74a2a194303471a2608967f8790f39881615e564
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3626a193d3d97014df421b540f8e75516dd8745c6ebbdd95fe88addfaf1dabda4f0a2de88049ec13124656a2c5f30e5448441dab137465ec950f1cb5a4c9978c
|
|
7
|
+
data.tar.gz: 2a5f8f5acbf9ca9667cf837f5344568b879faa77ac3f4f15aad8fe97fa61f1b9e6b87af193776884bedb89526735b8f15c0e13c5bb884cef0d42e5c0465e876f
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
|
@@ -271,7 +271,7 @@ module Async
|
|
|
271
271
|
|
|
272
272
|
# Notify policy of exit (after statistics are updated):
|
|
273
273
|
begin
|
|
274
|
-
@policy.child_exit(self, child, status
|
|
274
|
+
@policy.child_exit(self, child, status, name: name, key: key)
|
|
275
275
|
rescue => error
|
|
276
276
|
Console.error(self, "Policy error in child_exit!", exception: error)
|
|
277
277
|
end
|
|
@@ -12,7 +12,8 @@ module Async
|
|
|
12
12
|
# @parameter child [Child] The child process.
|
|
13
13
|
# @parameter name [String] The name of the child.
|
|
14
14
|
# @parameter key [Symbol] An optional key for the child.
|
|
15
|
-
|
|
15
|
+
# @parameter options [Hash] Additional options for future extensibility.
|
|
16
|
+
def child_spawn(container, child, name:, key:, **options)
|
|
16
17
|
end
|
|
17
18
|
|
|
18
19
|
# Called when a child exits.
|
|
@@ -21,7 +22,8 @@ module Async
|
|
|
21
22
|
# @parameter status [Process::Status] The exit status.
|
|
22
23
|
# @parameter name [String] The name of the child.
|
|
23
24
|
# @parameter key [Symbol] An optional key for the child.
|
|
24
|
-
|
|
25
|
+
# @parameter options [Hash] Additional options for future extensibility.
|
|
26
|
+
def child_exit(container, child, status, name:, key:, **options)
|
|
25
27
|
end
|
|
26
28
|
|
|
27
29
|
# Called when a health check fails.
|
|
@@ -30,8 +32,9 @@ module Async
|
|
|
30
32
|
# @parameter child [Child] The child process.
|
|
31
33
|
# @parameter age [Numeric] How long the child has been running.
|
|
32
34
|
# @parameter timeout [Numeric] The health check timeout that was exceeded.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
# @parameter options [Hash] Additional options for future extensibility.
|
|
36
|
+
def health_check_failed(container, child, age:, timeout:, **options)
|
|
37
|
+
Console.warn(self, "Health check failed!", child: child, age: age, timeout: timeout)
|
|
35
38
|
child.kill!
|
|
36
39
|
end
|
|
37
40
|
|
|
@@ -41,8 +44,9 @@ module Async
|
|
|
41
44
|
# @parameter child [Child] The child process.
|
|
42
45
|
# @parameter age [Numeric] How long the child has been running.
|
|
43
46
|
# @parameter timeout [Numeric] The startup timeout that was exceeded.
|
|
44
|
-
|
|
45
|
-
|
|
47
|
+
# @parameter options [Hash] Additional options for future extensibility.
|
|
48
|
+
def startup_failed(container, child, age:, timeout:, **options)
|
|
49
|
+
Console.warn(self, "Startup failed!", child: child, age: age, timeout: timeout)
|
|
46
50
|
child.kill!
|
|
47
51
|
end
|
|
48
52
|
|
data/readme.md
CHANGED
|
@@ -28,6 +28,11 @@ 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.32.0
|
|
32
|
+
|
|
33
|
+
- Minor **breaking** changes to `Async::Container::Policy` interface.
|
|
34
|
+
- Expose `Async::Container::Statistics::Rate#window`.
|
|
35
|
+
|
|
31
36
|
### v0.31.0
|
|
32
37
|
|
|
33
38
|
- Introduce `Async::Container::Policy` for managing child lifecycle events and implementing custom failure handling strategies.
|
|
@@ -69,11 +74,6 @@ Please see the [project releases](https://socketry.github.io/async-container/rel
|
|
|
69
74
|
|
|
70
75
|
- Log caller and timeout when waiting on a child instance to exit, if it blocks.
|
|
71
76
|
|
|
72
|
-
### v0.27.0
|
|
73
|
-
|
|
74
|
-
- Increased default interrupt timeout and terminate timeout to 10 seconds each.
|
|
75
|
-
- Expose `ASYNC_CONTAINER_INTERRUPT_TIMEOUT` and `ASYNC_CONTAINER_TERMINATE_TIMEOUT` environment variables for configuring default timeouts.
|
|
76
|
-
|
|
77
77
|
## Contributing
|
|
78
78
|
|
|
79
79
|
We welcome contributions to this project.
|
data/releases.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Releases
|
|
2
2
|
|
|
3
|
+
## v0.32.0
|
|
4
|
+
|
|
5
|
+
- Minor **breaking** changes to `Async::Container::Policy` interface.
|
|
6
|
+
- Expose `Async::Container::Statistics::Rate#window`.
|
|
7
|
+
|
|
3
8
|
## v0.31.0
|
|
4
9
|
|
|
5
10
|
- Introduce `Async::Container::Policy` for managing child lifecycle events and implementing custom failure handling strategies.
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
|
Binary file
|