async-container 0.34.5 → 0.35.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 +5 -0
- data/lib/async/container/hybrid.rb +8 -7
- data/lib/async/container/version.rb +1 -1
- data/readme.md +20 -5
- data/releases.md +4 -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: 047d770adce55a53f648a828ac9e1b4694598d8815d06c271cb293b31829ac90
|
|
4
|
+
data.tar.gz: d54a1bda7d25bd2d33b72c62ea0722a8c82a3a68045b1cae529ed149d37e5ea8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5175d784347c33381f3014ce30845448890b6074ddb606861877fb23937a1afcdf0d776dd70d5f700498de4b09e59560936b78f59d0b3b2f2bf9b96d132efa24
|
|
7
|
+
data.tar.gz: c5e130f7dd4723935e9ae95f3aebb63dcea17aba57c2a995a5bb5ac4085973e63b5c1bf3dfb79d9ea79dd20b3a017be9b7f38937babe4f09ac7c6135f44f7300
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
|
@@ -115,6 +115,11 @@ module Async
|
|
|
115
115
|
@group.wait
|
|
116
116
|
end
|
|
117
117
|
|
|
118
|
+
# Gracefully interrupt all child instances.
|
|
119
|
+
def interrupt
|
|
120
|
+
@group.interrupt
|
|
121
|
+
end
|
|
122
|
+
|
|
118
123
|
# Returns true if all children instances have the specified status flag set.
|
|
119
124
|
# e.g. `:ready`.
|
|
120
125
|
# This state is updated by the process readiness protocol mechanism. See {Notify::Client} for more details.
|
|
@@ -31,14 +31,15 @@ module Async
|
|
|
31
31
|
container.wait_until_ready
|
|
32
32
|
instance.ready!
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
begin
|
|
35
|
+
container.wait
|
|
36
|
+
rescue Interrupt
|
|
37
|
+
# Gracefully interrupt child threads; parent process handles escalation.
|
|
38
|
+
container.interrupt
|
|
39
|
+
retry
|
|
40
|
+
end
|
|
39
41
|
ensure
|
|
40
|
-
|
|
41
|
-
container.stop
|
|
42
|
+
container.stop(false)
|
|
42
43
|
end
|
|
43
44
|
end
|
|
44
45
|
|
data/readme.md
CHANGED
|
@@ -28,6 +28,10 @@ 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.35.0
|
|
32
|
+
|
|
33
|
+
- **Fixed**: `Hybrid` now interrupts inner threaded children during graceful shutdown and force-stops remaining children on exit.
|
|
34
|
+
|
|
31
35
|
### v0.34.5
|
|
32
36
|
|
|
33
37
|
- **Fixed**: `instance.exec` with `ready: true` no longer causes premature termination. The notification pipe is now always passed to the exec'd process.
|
|
@@ -67,11 +71,6 @@ Please see the [project releases](https://socketry.github.io/async-container/rel
|
|
|
67
71
|
- Add `Async::Container::Statistics::Rate` for tracking failure and restart rates over sliding time windows.
|
|
68
72
|
- Fix restart counter to only increment when actually restarting (check `@running` flag).
|
|
69
73
|
|
|
70
|
-
### v0.30.0
|
|
71
|
-
|
|
72
|
-
- `SIGTERM` is now graceful, the same as `SIGINT`, for better compatibility with Kubernetes and systemd.
|
|
73
|
-
- `ASYNC_CONTAINER_INTERRUPT_TIMEOUT` and `ASYNC_CONTAINER_TERMINATE_TIMEOUT` are removed and replaced by `ASYNC_CONTAINER_GRACEFUL_TIMEOUT`.
|
|
74
|
-
|
|
75
74
|
## Contributing
|
|
76
75
|
|
|
77
76
|
We welcome contributions to this project.
|
|
@@ -82,6 +81,22 @@ We welcome contributions to this project.
|
|
|
82
81
|
4. Push to the branch (`git push origin my-new-feature`).
|
|
83
82
|
5. Create new Pull Request.
|
|
84
83
|
|
|
84
|
+
### Running Tests
|
|
85
|
+
|
|
86
|
+
To run the test suite:
|
|
87
|
+
|
|
88
|
+
``` shell
|
|
89
|
+
bundle exec sus
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Making Releases
|
|
93
|
+
|
|
94
|
+
To make a new release:
|
|
95
|
+
|
|
96
|
+
``` shell
|
|
97
|
+
bundle exec bake gem:release:patch # or minor or major
|
|
98
|
+
```
|
|
99
|
+
|
|
85
100
|
### Developer Certificate of Origin
|
|
86
101
|
|
|
87
102
|
In order to protect users of this project, we require all contributors to comply with the [Developer Certificate of Origin](https://developercertificate.org/). This ensures that all contributions are properly licensed and attributed.
|
data/releases.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Releases
|
|
2
2
|
|
|
3
|
+
## v0.35.0
|
|
4
|
+
|
|
5
|
+
- **Fixed**: `Hybrid` now interrupts inner threaded children during graceful shutdown and force-stops remaining children on exit.
|
|
6
|
+
|
|
3
7
|
## v0.34.5
|
|
4
8
|
|
|
5
9
|
- **Fixed**: `instance.exec` with `ready: true` no longer causes premature termination. The notification pipe is now always passed to the exec'd process.
|
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.
|
|
4
|
+
version: 0.35.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Samuel Williams
|
|
@@ -113,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
113
113
|
- !ruby/object:Gem::Version
|
|
114
114
|
version: '0'
|
|
115
115
|
requirements: []
|
|
116
|
-
rubygems_version: 4.0.
|
|
116
|
+
rubygems_version: 4.0.10
|
|
117
117
|
specification_version: 4
|
|
118
118
|
summary: Abstract container-based parallelism using threads and processes where appropriate.
|
|
119
119
|
test_files: []
|
metadata.gz.sig
CHANGED
|
Binary file
|