async-container-supervisor 0.5.0 → 0.5.2

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: b3e00594c33bb419f5ff6e62ee5fc995db3254c4c924c96fa442039bfd8bb8e2
4
- data.tar.gz: 44878ab7e6dfb5051650957366b7af8ba12c7e3368cb18b40a7bb8b55ac2f758
3
+ metadata.gz: 93e0e900670c190c3e7273139be86251e2545b2a0964fb0f2b2a36ea1d5332b3
4
+ data.tar.gz: 197597b0387af67fe3f01cf191cb003b66847ac4b0acd547592ad89825c9adbb
5
5
  SHA512:
6
- metadata.gz: '078b5c42c1bf947f8da0129e7478be89df2ad109d20f408fb34368e00bd87335524713749e6e734f49459f5ce991700b09f0404ce6512191a883941d9c9e5944'
7
- data.tar.gz: c471f47eab98de78180149969a052382f76f5ec10126352198aa62808e201a81b5d22beeeb1b3fe88a1b1ab84b6703f123e5d4addda2c3bfd55f52ee14f24893
6
+ metadata.gz: 29dcd9708dbb7fd0353d95ca17ff21e71bc16ae268ffad9c95d264f5eb07cfad238d9168231a3f42c3b45471f043f10677ea1d7f3192c1f964ac49b830babeb9
7
+ data.tar.gz: ecfe4b2d7c78208391c7e2ccfe0a2ba09898335b4c5069bbd01fb001b759df6750901158c66cc4b5a3558de8a62b971a3a707c023ed6960d9a2645da9a8b4bbf
checksums.yaml.gz.sig CHANGED
Binary file
@@ -1,3 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Released under the MIT License.
4
+ # Copyright, 2025, by Samuel Williams.
1
5
 
2
6
  def initialize(...)
3
7
  super
@@ -56,8 +56,11 @@ module Async
56
56
  end
57
57
 
58
58
  def finish(**response)
59
- self.push(id: @id, finished: true, **response)
60
- @queue.close
59
+ # If the remote end has already closed the connection, we don't need to send a finished message:
60
+ unless @queue.closed?
61
+ self.push(id: @id, finished: true, **response)
62
+ @queue.close
63
+ end
61
64
  end
62
65
 
63
66
  def fail(**response)
@@ -14,6 +14,7 @@ module Async
14
14
  #
15
15
  # @parameter interval [Integer] The interval at which to check for memory leaks.
16
16
  # @parameter total_size_limit [Integer] The total size limit of all processes, or nil for no limit.
17
+ # @parameter options [Hash] Options to pass to the cluster when adding processes.
17
18
  def initialize(interval: 10, total_size_limit: nil, **options)
18
19
  @interval = interval
19
20
  @cluster = Memory::Leak::Cluster.new(total_size_limit: total_size_limit)
@@ -33,12 +34,12 @@ module Async
33
34
 
34
35
  # Register the connection (worker) with the memory monitor.
35
36
  def register(connection)
36
- Console.info(self, "Registering connection:", connection: connection, state: connection.state)
37
+ Console.debug(self, "Registering connection:", connection: connection, state: connection.state)
37
38
  if process_id = connection.state[:process_id]
38
39
  connections = @processes[process_id]
39
40
 
40
41
  if connections.empty?
41
- Console.info(self, "Registering process:", process_id: process_id)
42
+ Console.debug(self, "Registering process:", process_id: process_id)
42
43
  self.add(process_id)
43
44
  end
44
45
 
@@ -54,7 +55,7 @@ module Async
54
55
  connections.delete(connection)
55
56
 
56
57
  if connections.empty?
57
- Console.info(self, "Removing process:", process_id: process_id)
58
+ Console.debug(self, "Removing process:", process_id: process_id)
58
59
  @cluster.remove(process_id)
59
60
  end
60
61
  end
@@ -6,7 +6,7 @@
6
6
  module Async
7
7
  module Container
8
8
  module Supervisor
9
- VERSION = "0.5.0"
9
+ VERSION = "0.5.2"
10
10
  end
11
11
  end
12
12
  end
@@ -22,4 +22,4 @@ module Async
22
22
  module Supervisor
23
23
  end
24
24
  end
25
- end
25
+ end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async-container-supervisor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -36,7 +36,7 @@ cert_chain:
36
36
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
37
37
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
38
38
  -----END CERTIFICATE-----
39
- date: 2025-02-28 00:00:00.000000000 Z
39
+ date: 1980-01-02 00:00:00.000000000 Z
40
40
  dependencies:
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: async-container
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: io-stream
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: memory-leak
85
99
  requirement: !ruby/object:Gem::Requirement
@@ -127,14 +141,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
127
141
  requirements:
128
142
  - - ">="
129
143
  - !ruby/object:Gem::Version
130
- version: '3.1'
144
+ version: '3.2'
131
145
  required_rubygems_version: !ruby/object:Gem::Requirement
132
146
  requirements:
133
147
  - - ">="
134
148
  - !ruby/object:Gem::Version
135
149
  version: '0'
136
150
  requirements: []
137
- rubygems_version: 3.6.2
151
+ rubygems_version: 3.7.0.dev
138
152
  specification_version: 4
139
153
  summary: A supervisor for managing multiple container processes.
140
154
  test_files: []
metadata.gz.sig CHANGED
Binary file