async-container-supervisor 0.5.0 → 0.5.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b3e00594c33bb419f5ff6e62ee5fc995db3254c4c924c96fa442039bfd8bb8e2
4
- data.tar.gz: 44878ab7e6dfb5051650957366b7af8ba12c7e3368cb18b40a7bb8b55ac2f758
3
+ metadata.gz: 6a910d75fb13f17155f9786202f2ca613ca581cd2aa171c942638dc22a372aa9
4
+ data.tar.gz: 51b89119b6d9a77511a19436a09f21796bc0a88c0f1d9e0542cf530e18034242
5
5
  SHA512:
6
- metadata.gz: '078b5c42c1bf947f8da0129e7478be89df2ad109d20f408fb34368e00bd87335524713749e6e734f49459f5ce991700b09f0404ce6512191a883941d9c9e5944'
7
- data.tar.gz: c471f47eab98de78180149969a052382f76f5ec10126352198aa62808e201a81b5d22beeeb1b3fe88a1b1ab84b6703f123e5d4addda2c3bfd55f52ee14f24893
6
+ metadata.gz: 8e80d6ba0aa70e17aa8ec115d3536c4f38654e8403bd8a74a8bbc80014116035adeb68887a53d4e9eb13f03ec20dc286a8e24386bab1745ef6e0237baa0347bb
7
+ data.tar.gz: 97e1560def4b68e8a0afe42f6a7c6bdda005903ffb11edd909b9ec8c9756daed13d8e38f11c0ed0042b34202665216a0a39f948a51a2bbf348fd8933e33a3eef
checksums.yaml.gz.sig CHANGED
Binary file
@@ -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.1"
10
10
  end
11
11
  end
12
12
  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.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
metadata.gz.sig CHANGED
Binary file