async-container-supervisor 0.2.0 → 0.3.0
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 +29 -7
- data/lib/async/container/supervisor/memory_monitor.rb +1 -3
- 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: b5936025301bd2c10f66b6e1348207c6f59e94e41c9a5ac4705fe3cd70d6ed90
|
4
|
+
data.tar.gz: 19aea49ee76c918c3192acb05a6fb2ac87cdb73cb75c95965b716bcf9f571c56
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8cf7aa51fb4dd4947d43b37db76eb990ad06be54d5e9c1fa67016881cc80ef7d703aec514ca4be6243b33763dca221f2a8fe5f957c2fc0566d35cc893f0f3b10
|
7
|
+
data.tar.gz: 39d5d9b0ef7913af202d0ff7fc62b31afcbe3355075b21093deb6554fcc82a4a63a6ba68b0d5a67e91c4e367a873e616d124830fe87a535289bcfad5be003565
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -93,12 +93,34 @@ module Async
|
|
93
93
|
call = self.new(connection, id, message)
|
94
94
|
|
95
95
|
connection.calls[id] = call
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
96
|
+
begin
|
97
|
+
connection.write(id: id, **message)
|
98
|
+
|
99
|
+
if block_given?
|
100
|
+
call.each(&block)
|
101
|
+
else
|
102
|
+
intermediate = nil
|
103
|
+
|
104
|
+
while response = call.pop
|
105
|
+
if response.delete(:finished)
|
106
|
+
if intermediate
|
107
|
+
if response.any?
|
108
|
+
intermediate << response
|
109
|
+
end
|
110
|
+
|
111
|
+
return intermediate
|
112
|
+
else
|
113
|
+
return response
|
114
|
+
end
|
115
|
+
else
|
116
|
+
# Buffer intermediate responses:
|
117
|
+
intermediate ||= []
|
118
|
+
intermediate << response
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
122
|
+
ensure
|
123
|
+
connection.calls.delete(id)
|
102
124
|
end
|
103
125
|
end
|
104
126
|
end
|
@@ -156,7 +178,7 @@ module Async
|
|
156
178
|
|
157
179
|
def run(target)
|
158
180
|
self.each do |message|
|
159
|
-
if id = message
|
181
|
+
if id = message.delete(:id)
|
160
182
|
if call = @calls[id]
|
161
183
|
# Response to a call:
|
162
184
|
call.push(**message)
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|