async-container 0.35.0 → 0.35.1
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 +4 -0
- data/lib/async/container/version.rb +1 -1
- data/readme.md +4 -6
- data/releases.md +4 -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: 293edf1aac3945b8751879fe8b8180e7fb9bcc769f5b1bea315687f19d33ea11
|
|
4
|
+
data.tar.gz: 60699b17d30ce273a236b0728246a10fb7bb47691d3f2b3827a0bc08c51fa097
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2febcb62a2cdce3e43e92fa0d39a943bb92ade5ef0af9401810853fdb27bca98805a75d029926bbf61de0a130da293169fc9533d091d74cd11c0d01f0ee5c296
|
|
7
|
+
data.tar.gz: 909529d757ada40f2501f96455df4f4ecad4a739365b52ef35ef77ae449c9b6869351a73cb28e0c335ef0793fed2c35656a9e6218e1b79da73fec5d4a8b09e9c
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
|
@@ -117,6 +117,10 @@ module Async
|
|
|
117
117
|
|
|
118
118
|
# Gracefully interrupt all child instances.
|
|
119
119
|
def interrupt
|
|
120
|
+
# We must enter the stopping state before signalling the children. Interrupting a child causes it to drain and exit, but the main run loop will respawn any child that exits while `restart: true` and the container is not stopping (see the `restart && !@stopping` gate in `#run`). Without setting this flag, an interrupted child immediately respawns, so the container never drains and `#wait` never returns.
|
|
121
|
+
#
|
|
122
|
+
# This matters most for `Hybrid` containers: a `SIGINT`/`SIGTERM` delivered to a fork is translated into a call to `#interrupt` on the inner threaded container, which typically runs with `restart: true` (the default for `async-service` managed services). If `#interrupt` did not set this flag, the inner threads would drain, exit, and respawn in a loop, so a single signal would never terminate the fork. Setting `@stopping = true` here makes `#interrupt` behave as the start of a graceful shutdown: children drain and exit, are not respawned, and the fork terminates - consistent with how `Forked` and `Threaded` containers handle a single interrupt.
|
|
123
|
+
@stopping = true
|
|
120
124
|
@group.interrupt
|
|
121
125
|
end
|
|
122
126
|
|
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.1
|
|
32
|
+
|
|
33
|
+
- **Fixed**: `Hybrid` container now stops on interrupt instead of restarting indefinitely.
|
|
34
|
+
|
|
31
35
|
### v0.35.0
|
|
32
36
|
|
|
33
37
|
- **Fixed**: `Hybrid` now interrupts inner threaded children during graceful shutdown and force-stops remaining children on exit.
|
|
@@ -65,12 +69,6 @@ Please see the [project releases](https://socketry.github.io/async-container/rel
|
|
|
65
69
|
- Minor **breaking** changes to `Async::Container::Policy` interface.
|
|
66
70
|
- Expose `Async::Container::Statistics::Rate#window`.
|
|
67
71
|
|
|
68
|
-
### v0.31.0
|
|
69
|
-
|
|
70
|
-
- Introduce `Async::Container::Policy` for managing child lifecycle events and implementing custom failure handling strategies.
|
|
71
|
-
- Add `Async::Container::Statistics::Rate` for tracking failure and restart rates over sliding time windows.
|
|
72
|
-
- Fix restart counter to only increment when actually restarting (check `@running` flag).
|
|
73
|
-
|
|
74
72
|
## Contributing
|
|
75
73
|
|
|
76
74
|
We welcome contributions to this project.
|
data/releases.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Releases
|
|
2
2
|
|
|
3
|
+
## v0.35.1
|
|
4
|
+
|
|
5
|
+
- **Fixed**: `Hybrid` container now stops on interrupt instead of restarting indefinitely.
|
|
6
|
+
|
|
3
7
|
## v0.35.0
|
|
4
8
|
|
|
5
9
|
- **Fixed**: `Hybrid` now interrupts inner threaded children during graceful shutdown and force-stops remaining children on exit.
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
|
Binary file
|