rbbt-util 5.5.28 → 5.5.29
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/rbbt/workflow/accessor.rb +11 -5
- data/share/rbbt_commands/workflow/task +4 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OTMxYzQzNDY1OTYzOGVkMDNmNzYzNWRkMDYwMGE0NmZkMDllZWQzNg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MWM0NzE2MGU1OTM1NGJiZTVhMDgzMDU2ZjFjOTkzYmFiMTkwNDViYg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NWU0YzI4NWRjOGNiZjVhZTMwMTBhODFlMjQyZWYyNWFkZWU4MjIyZmFlNjFk
|
10
|
+
MWZkMTM1YWVmNDE0MjBjY2FmYTNkMTRjNjIxYjczNTk0ZTVjYzU4MTcxNzE4
|
11
|
+
ZDQwZDk0ZDAwNGM4MDA1MWNiY2E4YzJlODNmMjVkMGQxNDA0ZjA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
Zjc5NzE1YmVkNTU4NTNkNDNjZDEwODk1ZGQyNWQxOGZjNThhZTY4NjcxNzY5
|
14
|
+
YTRjMjM5OTllODhiYmRkMTlmMjI4NWMwY2Q1MjM3YmFjMzMwYTdiODBjMTQz
|
15
|
+
NTM3YmY3M2U2M2YzOTY2ZTU3ZjE4MDRmMjE4Y2M5MWEwYTNkYjc=
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require 'rbbt/util/open'
|
1
|
+
require 'rbbt/util/open'
|
2
2
|
require 'yaml'
|
3
3
|
|
4
4
|
class Step
|
@@ -20,11 +20,13 @@ class Step
|
|
20
20
|
# {{{ INFO
|
21
21
|
|
22
22
|
def info_file
|
23
|
-
@
|
23
|
+
@info_file ||= begin
|
24
|
+
@path.nil? ? nil : @path + '.info'
|
25
|
+
end
|
24
26
|
end
|
25
27
|
|
26
28
|
def info
|
27
|
-
return {} if not Open.exists? info_file
|
29
|
+
return {} if info_file.nil? or not Open.exists? info_file
|
28
30
|
begin
|
29
31
|
Misc.insist(2, 0.5) do
|
30
32
|
Open.open(info_file) do |file|
|
@@ -38,7 +40,7 @@ class Step
|
|
38
40
|
end
|
39
41
|
|
40
42
|
def set_info(key, value)
|
41
|
-
return nil if @exec
|
43
|
+
return nil if @exec or info_file.nil?
|
42
44
|
value = Annotated.purge value if defined? Annotated
|
43
45
|
Open.lock(info_file) do
|
44
46
|
i = info
|
@@ -57,7 +59,11 @@ class Step
|
|
57
59
|
end
|
58
60
|
|
59
61
|
def messages
|
60
|
-
|
62
|
+
if messages = info[:messages]
|
63
|
+
messages
|
64
|
+
else
|
65
|
+
set_info(:messages, []) if self.respond_to?(:set_info)
|
66
|
+
end
|
61
67
|
end
|
62
68
|
|
63
69
|
def message(message)
|
@@ -112,6 +112,7 @@ options = SOPT.get <<EOF
|
|
112
112
|
-rcl--recursive_clean Clean the last step and its dependencies to recompute the job completely:
|
113
113
|
-jn--jobname* Job name to use. The name 'Default' is used by default:
|
114
114
|
-pn--printname Print the name of the job and exit without starting it:
|
115
|
+
--fork Run job asyncronously:
|
115
116
|
EOF
|
116
117
|
|
117
118
|
workflow = ARGV.shift
|
@@ -205,10 +206,12 @@ end
|
|
205
206
|
if do_fork
|
206
207
|
job.fork
|
207
208
|
while not job.done?
|
208
|
-
|
209
|
+
message = job.messages ? job.messages.last : "no message"
|
210
|
+
Log.debug "#{job.status}: #{message}"
|
209
211
|
sleep 2
|
210
212
|
end
|
211
213
|
raise job.messages.last if job.error?
|
214
|
+
res = job.load
|
212
215
|
else
|
213
216
|
res = job.run(true)
|
214
217
|
end
|