ztk 3.3.0 → 3.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ztk/parallel.rb +6 -4
- data/lib/ztk/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af11dbab71ae32f23c81221e541b24e9c92b3647
|
4
|
+
data.tar.gz: 30d538e35a264f242cafa10c119a8b830db623c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd6a20e985bbbb958a4ee86ecb1d3ef508f4e535b71232e0d8d20f997e261beba4095a5675ad367ffe03d5a2b736aa994cf99a1fdad25a3c07f64f34f3766346
|
7
|
+
data.tar.gz: fb28716f179ec5641410278921d7e3a5edb0d788d2d861fd2fdd9c3b48909816911a008b6d144132c4d912d38bad2a7d090186bfa9abe223c603e605f3f31bad
|
data/lib/ztk/parallel.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'base64'
|
2
2
|
require 'timeout'
|
3
|
+
require 'zlib'
|
3
4
|
|
4
5
|
module ZTK
|
5
6
|
|
@@ -163,9 +164,10 @@ module ZTK
|
|
163
164
|
end
|
164
165
|
|
165
166
|
if !data.nil?
|
166
|
-
config.ui.logger.debug { "write(#{data.inspect})" }
|
167
167
|
begin
|
168
|
-
|
168
|
+
encoded_data = Base64.encode64(Zlib::Deflate.deflate(Marshal.dump(data)))
|
169
|
+
config.ui.logger.debug { "write(#{encoded_data.length}B: #{data.inspect})" }
|
170
|
+
child_writer.write(encoded_data)
|
169
171
|
rescue Exception => e
|
170
172
|
config.ui.logger.warn { "Exception while writing data to child_writer! - #{e.inspect}" }
|
171
173
|
end
|
@@ -206,10 +208,10 @@ module ZTK
|
|
206
208
|
|
207
209
|
return nil if @forks.count <= 0
|
208
210
|
|
209
|
-
pid, status = (Process.wait2(-1,
|
211
|
+
pid, status = (Process.wait2(-1, Process::WUNTRACED) rescue nil)
|
210
212
|
|
211
213
|
if !pid.nil? && !status.nil? && !(fork = @forks.select{ |f| f[:pid] == pid }.first).nil?
|
212
|
-
data =
|
214
|
+
data = Marshal.load(Zlib::Inflate.inflate(Base64.decode64(fork[:reader].read).to_s))
|
213
215
|
config.ui.logger.debug { "read(#{data.inspect})" }
|
214
216
|
|
215
217
|
data = process_data(data)
|
data/lib/ztk/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ztk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.3.
|
4
|
+
version: 3.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zachary Patten
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|