You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/async/container/generic.rb
+14-25Lines changed: 14 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,6 @@
8
8
require"async/clock"
9
9
10
10
require_relative"group"
11
-
require_relative"keyed"
12
11
require_relative"statistics"
13
12
require_relative"policy"
14
13
@@ -79,7 +78,7 @@ def to_s
79
78
# Look up a child process by key.
80
79
# A key could be a symbol, a file path, or something else which the child instance represents.
81
80
def [] key
82
-
@keyed[key]&.value
81
+
@keyed[key]
83
82
end
84
83
85
84
# Statistics relating to the behavior of children instances.
@@ -210,13 +209,13 @@ def stop(timeout = true)
210
209
# Spawn a child instance into the container.
211
210
# @parameter name [String] The name of the child instance.
212
211
# @parameter restart [Boolean] Whether to restart the child instance if it fails.
213
-
# @parameter key [Symbol] A key used for reloading child instances.
212
+
# @parameter key [Symbol] An optional key used to look up (via {[]}) and reuse the child instance.
214
213
# @parameter health_check_timeout [Numeric | Nil] The maximum time a child instance can run without updating its state, before it is terminated as unhealthy.
215
214
# @parameter startup_timeout [Numeric | Nil] The maximum time a child instance can run without becoming ready, before it is terminated as unhealthy.
Copy file name to clipboardExpand all lines: releases.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,9 @@
1
1
# Releases
2
2
3
+
## Unreleased
4
+
5
+
-**Removed**`Controller#reload` and the container-level keyed reconciliation (`Keyed`, mark/sweep, and stopping of obsolete keyed children on reload). This functionality was incomplete and not correctly wired, and will be revisited with a simpler design. Keyed `spawn(key:)` registration and `container[key]` lookup are retained, and `Container#reload` now simply re-runs the given block (reusing existing keyed children).
6
+
3
7
## v0.37.0
4
8
5
9
- Rename `ASYNC_CONTAINER_GRACEFUL_TIMEOUT` to `ASYNC_CONTAINER_GRACEFUL_STOP` and apply it at the controller level as `GRACEFUL_STOP`. `Group#stop` now only applies the shutdown policy it is given.
0 commit comments