async-container-supervisor 0.6.1 → 0.6.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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/async/container/supervisor/connection.rb +4 -1
- data/lib/async/container/supervisor/dispatchable.rb +1 -1
- data/lib/async/container/supervisor/server.rb +9 -15
- data/lib/async/container/supervisor/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9e01edf13b77af9c7b4d0a93869a64233d9121194cdafa33307713208c4c364c
|
|
4
|
+
data.tar.gz: 67bdd6ff907a23d7a3c4049558c20a586ac831ec5aae29eafdf3f0318a5d2470
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 241be150b5fcc3329624d5d21aef08d7fc418a6fd97c8b521c34060dbffe209d1d0802f6b3591a9730f1497fdf92838c605c5316f2032c77ab380de56217aff5
|
|
7
|
+
data.tar.gz: 27013843d5d63de93777e1f39979c8ca416930e15cca536248a81793f193d4b7204c8f8e2d565cb2ff7f8f87be6a661a1e64e9d0e611cbb4b28d17eaefdaa907
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
|
@@ -185,9 +185,12 @@ module Async
|
|
|
185
185
|
if call = @calls[id]
|
|
186
186
|
# Response to a call:
|
|
187
187
|
call.push(**message)
|
|
188
|
-
|
|
188
|
+
elsif message.key?(:do)
|
|
189
189
|
# Incoming call:
|
|
190
190
|
Call.dispatch(self, target, id, message)
|
|
191
|
+
else
|
|
192
|
+
# Likely a response to a timed-out call, ignore it:
|
|
193
|
+
Console.debug(self, "Ignoring message:", message)
|
|
191
194
|
end
|
|
192
195
|
else
|
|
193
196
|
Console.error(self, "Unknown message:", message)
|
|
@@ -14,7 +14,7 @@ module Async
|
|
|
14
14
|
method_name = "do_#{call.message[:do]}"
|
|
15
15
|
self.public_send(method_name, call)
|
|
16
16
|
rescue => error
|
|
17
|
-
Console.error(self, "Error while dispatching call
|
|
17
|
+
Console.error(self, "Error while dispatching call!", exception: error, call: call)
|
|
18
18
|
|
|
19
19
|
call.fail(error: {
|
|
20
20
|
class: error.class,
|
|
@@ -27,11 +27,9 @@ module Async
|
|
|
27
27
|
call.connection.state.merge!(call.message[:state])
|
|
28
28
|
|
|
29
29
|
@monitors.each do |monitor|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
Console.error(self, "Error while registering process!", monitor: monitor, exception: error)
|
|
34
|
-
end
|
|
30
|
+
monitor.register(call.connection)
|
|
31
|
+
rescue => error
|
|
32
|
+
Console.error(self, "Error while registering process!", monitor: monitor, exception: error)
|
|
35
33
|
end
|
|
36
34
|
ensure
|
|
37
35
|
call.finish
|
|
@@ -59,22 +57,18 @@ module Async
|
|
|
59
57
|
|
|
60
58
|
def remove(connection)
|
|
61
59
|
@monitors.each do |monitor|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
Console.error(self, "Error while removing process!", monitor: monitor, exception: error)
|
|
66
|
-
end
|
|
60
|
+
monitor.remove(connection)
|
|
61
|
+
rescue => error
|
|
62
|
+
Console.error(self, "Error while removing process!", monitor: monitor, exception: error)
|
|
67
63
|
end
|
|
68
64
|
end
|
|
69
65
|
|
|
70
66
|
def run(parent: Task.current)
|
|
71
67
|
parent.async do |task|
|
|
72
68
|
@monitors.each do |monitor|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
Console.error(self, "Error while starting monitor!", monitor: monitor, exception: error)
|
|
77
|
-
end
|
|
69
|
+
monitor.run
|
|
70
|
+
rescue => error
|
|
71
|
+
Console.error(self, "Error while starting monitor!", monitor: monitor, exception: error)
|
|
78
72
|
end
|
|
79
73
|
|
|
80
74
|
@endpoint.accept do |peer|
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
|
Binary file
|