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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 24cae4f000d76b4033e8999f22797b54018096a94f363f814790b360f78b429f
4
- data.tar.gz: d4f348bc43b4eeb9296bf35075a38a3173460ef0828833a46851e1f32a1e0980
3
+ metadata.gz: 977328d9a4dc6b4b7c86f634de0dba5f97b6e9da9c404b39ba1beea29f5711cc
4
+ data.tar.gz: 766a0c91a80afa6e3867ecdaae4bcfc8fb75dde5a6e9d12a3c2afe29790d4e9b
5
5
  SHA512:
6
- metadata.gz: d2fa294029f4ee0d799850fb5e9f93c51f1cf7e9d1dcea2b6adb68b271b68b8acbcb1711a63dbdc0357e896b4609751420edad10bc2f8a19f47c87ed8f461a09
7
- data.tar.gz: 28c8868284e8ef7c6f762bb1de5847d710ae57564e505df02ba85cd0c0c9f4ad915f19a15c10dc75ce373196bd51cccca9a96d2f8b4b1ff950737c799b4df06a
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
 
@@ -170,8 +170,6 @@ module Async
170
170
  rescue => error
171
171
  Console.error(self, "Error while stopping container!", exception: error)
172
172
  raise
173
- ensure
174
- @stopping = false
175
173
  end
176
174
 
177
175
  protected def health_check_failed(child, age_clock, health_check_timeout)
@@ -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
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019-2025, by Samuel Williams.
4
+ # Copyright, 2019-2026, by Samuel Williams.
5
5
 
6
6
  require "async/reactor"
7
7
 
@@ -5,6 +5,6 @@
5
5
 
6
6
  module Async
7
7
  module Container
8
- VERSION = "0.34.1"
8
+ VERSION = "0.34.3"
9
9
  end
10
10
  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.1
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.2'
103
+ version: '3.3'
104
104
  required_rubygems_version: !ruby/object:Gem::Requirement
105
105
  requirements:
106
106
  - - ">="
metadata.gz.sig CHANGED
Binary file