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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a910d75fb13f17155f9786202f2ca613ca581cd2aa171c942638dc22a372aa9
|
4
|
+
data.tar.gz: 51b89119b6d9a77511a19436a09f21796bc0a88c0f1d9e0542cf530e18034242
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
60
|
-
@queue.
|
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.
|
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.
|
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.
|
58
|
+
Console.debug(self, "Removing process:", process_id: process_id)
|
58
59
|
@cluster.remove(process_id)
|
59
60
|
end
|
60
61
|
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|