rbbt-util 5.5.28 → 5.5.29

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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZmE1YzVmNzZmODhiNjA2YzI0MWMxNWIwOTcyOWE4YjFiMzBmNjQ3Yg==
4
+ OTMxYzQzNDY1OTYzOGVkMDNmNzYzNWRkMDYwMGE0NmZkMDllZWQzNg==
5
5
  data.tar.gz: !binary |-
6
- NGYzNDVkY2U2NmIxNjRjZWZmMGY3NTdlN2QwMTVhYmZkN2Y4NzE3Mg==
6
+ MWM0NzE2MGU1OTM1NGJiZTVhMDgzMDU2ZjFjOTkzYmFiMTkwNDViYg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MzU1NDIzZWIyYThjNDQxYmE4NjM1Mzg4ZjUxODU5NTEzODgxODY0Y2RmZmI3
10
- MTk2NjQ4ZjBiMzIzM2ZkOTBlYjY0NzY2OWZmZDY0NDM3N2I5YmJjY2U5YWJm
11
- OGQ2NDFiNDY0ODMyNDgyZjI0ZTZiY2QyZDQ3MWVkMzdhNzVmYTE=
9
+ NWU0YzI4NWRjOGNiZjVhZTMwMTBhODFlMjQyZWYyNWFkZWU4MjIyZmFlNjFk
10
+ MWZkMTM1YWVmNDE0MjBjY2FmYTNkMTRjNjIxYjczNTk0ZTVjYzU4MTcxNzE4
11
+ ZDQwZDk0ZDAwNGM4MDA1MWNiY2E4YzJlODNmMjVkMGQxNDA0ZjA=
12
12
  data.tar.gz: !binary |-
13
- Mjk5YzNhMDM5Yjk4ZDRlMTdiNTMwMmNhYjc0YWFlYTdiYWRlOGM3OGNjOTE2
14
- ODIzOTU1ZDk5ZGZiNTQ2MDdjZmY5Yjg1ZDg5NWJmNzEzMWU3ZDIyZWRiZjFj
15
- MmJhNjM0MzJjZThhMjJiMjQwZWY0ZTNhYjVkMDBiNGI1YjM3ZTU=
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
- @path + '.info'
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
- info[:messages] || set_info(:messages, [])
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
- Log.debug "#{job.step}: #{job.messages.last}"
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbbt-util
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.5.28
4
+ version: 5.5.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Vazquez