rbbt-util 5.11.6 → 5.11.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rbbt/workflow/step.rb +2 -1
- data/lib/rbbt/workflow/step/run.rb +10 -10
- data/test/rbbt/test_workflow.rb +2 -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: a0b0c06dd413bbda58854a7049a059bf5063fbfc
|
4
|
+
data.tar.gz: ecd6b277d6914343a6a3ad9c6cf60aa2ccb7f9ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c54603a690dd9aed68719cf07641252a80e2705b523601856202afaff71a7aaea4b5af91da396795a9f0a80b7f7edbfa2d638f1d8464396b37c5e82e83128e0
|
7
|
+
data.tar.gz: 6286a580ecef53c0c2509c52a2b4a322e71399812d1de75b3d800d5f1175c0a0c4bccbe1ec9ff35ad8e431a11a41a362d3882f0ad8c816b9b2c12b25c269c42a
|
data/lib/rbbt/workflow/step.rb
CHANGED
@@ -3,7 +3,6 @@ require 'rbbt/persist/tsv'
|
|
3
3
|
require 'rbbt/util/log'
|
4
4
|
require 'rbbt/util/semaphore'
|
5
5
|
require 'rbbt/workflow/accessor'
|
6
|
-
require 'rbbt/workflow/step/run'
|
7
6
|
|
8
7
|
class Step
|
9
8
|
attr_accessor :path, :task, :inputs, :dependencies, :bindings
|
@@ -180,3 +179,5 @@ class Step
|
|
180
179
|
end.first
|
181
180
|
end
|
182
181
|
end
|
182
|
+
|
183
|
+
require 'rbbt/workflow/step/run'
|
@@ -19,7 +19,7 @@ class Step
|
|
19
19
|
|
20
20
|
def exec(no_load=false)
|
21
21
|
dependencies.each{|dependency| dependency.exec(no_load) }
|
22
|
-
@result = _exec
|
22
|
+
@result = self._exec
|
23
23
|
@result = @result.stream if TSV::Dumper === @result
|
24
24
|
no_load ? @result : prepare_result(@result, @task.result_description)
|
25
25
|
end
|
@@ -188,7 +188,7 @@ class Step
|
|
188
188
|
end
|
189
189
|
|
190
190
|
def fork(semaphore = nil)
|
191
|
-
raise "Can not fork: Step is waiting for proces #{@pid} to finish" if not @pid.nil? and not Process.pid == @pid
|
191
|
+
raise "Can not fork: Step is waiting for proces #{@pid} to finish" if not @pid.nil? and not Process.pid == @pid and Misc.pid_exists?(@pid) and not done? and info[:forked]
|
192
192
|
@pid = Process.fork do
|
193
193
|
begin
|
194
194
|
RbbtSemaphore.wait_semaphore(semaphore) if semaphore
|
@@ -300,23 +300,23 @@ class Step
|
|
300
300
|
join_stream
|
301
301
|
|
302
302
|
return if not Open.exists? info_file
|
303
|
-
|
303
|
+
pid = @pid
|
304
304
|
|
305
305
|
Misc.insist [0.1, 0.2, 0.5, 1] do
|
306
|
-
|
306
|
+
pid ||= info[:pid]
|
307
307
|
end
|
308
308
|
|
309
|
-
if
|
309
|
+
if pid.nil?
|
310
310
|
dependencies.each{|dep| dep.join }
|
311
311
|
self
|
312
312
|
else
|
313
313
|
begin
|
314
|
-
Log.debug{"Waiting for pid: #{
|
315
|
-
Process.waitpid
|
314
|
+
Log.debug{"Waiting for pid: #{pid}"}
|
315
|
+
Process.waitpid pid
|
316
316
|
rescue Errno::ECHILD
|
317
|
-
Log.debug{"Process #{
|
318
|
-
end if Misc.pid_exists?
|
319
|
-
|
317
|
+
Log.debug{"Process #{ pid } already finished: #{ path }"}
|
318
|
+
end if Misc.pid_exists? pid
|
319
|
+
pid = nil
|
320
320
|
dependencies.each{|dep| dep.join }
|
321
321
|
self
|
322
322
|
end
|
data/test/rbbt/test_workflow.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbbt-util
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.11.
|
4
|
+
version: 5.11.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|