rbbt-util 5.23.19 → 5.23.20

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,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5ea281c4b995f87831e4ad034423d3ca5ff1b6f5
4
- data.tar.gz: 4e8c74787a866cbfdf0bc0b45d18b89f043751a2
3
+ metadata.gz: d092d9923d01da9560a5e01b1da4d1d997acb866
4
+ data.tar.gz: 7d6ab5b9b06cfb2eb4ac7cdee01f6e40a3103e51
5
5
  SHA512:
6
- metadata.gz: 6c62ba3da73a0cf27a1aa41cb82b6b9d32a97dac3dafe62efbd7552a7a6cc58f69b577708b377f1b34f6b50d748a06e95b8e34e2b95b69a1fb392a1292adedff
7
- data.tar.gz: 74c2fbcee1ada86a02a540232bec94581048b585dcb55015ae59b1988b9d0de8e4b460bffabf5100f3b043486c35f04b2b430da1c39521332d3c1d3a7360946a
6
+ metadata.gz: 26aae362cb13a519b16c78fa497655b45b9d5de49119607c677d65e8ecc0e25cfe7f09ca4fb008b35d7894b372cd97ee1cab26fbc1614debf79b5204d171b0c3
7
+ data.tar.gz: 9e78df0466cb39d1329e44a26d4d0559c557ab3967b70b1c6565c9b45d17ccbab1ca740e44e42c18241ce3c293e8b1b075c87b68d92dbd197294fa6da39f1e62
@@ -117,6 +117,8 @@ module Log
117
117
  1
118
118
  end
119
119
  end
120
+
121
+ thr = 0.0000001 if thr == 0
120
122
 
121
123
  if mean.nil? or mean.to_i > 1
122
124
  str = "#{ Log.color :blue, thr.to_i.to_s } per sec."
@@ -565,6 +565,7 @@ module Open
565
565
  end
566
566
 
567
567
  def self.writable?(path)
568
+ path = path.find if Path === path
568
569
  if File.exists?(path)
569
570
  File.writable?(path)
570
571
  else
data/lib/rbbt/workflow.rb CHANGED
@@ -470,7 +470,10 @@ module Workflow
470
470
  def self.relocate(real, other)
471
471
  preal = real.split(/\/+/)
472
472
  pother = other.split(/\/+/)
473
- (preal[0..-4] + pother[-3..-1]) * "/"
473
+ end_part = pother[-3..-1] * "/"
474
+ new_path = preal[0..-4] * "/" << end_part
475
+ return new_path if File.exists? new_path
476
+ Rbbt.var.jobs[end_part].find
474
477
  end
475
478
 
476
479
  def self.load_step(path)
@@ -1038,7 +1038,8 @@ module Workflow
1038
1038
  when :hash
1039
1039
  clean_inputs = Annotated.purge(inputs)
1040
1040
  clean_inputs = clean_inputs.collect{|i| Symbol === i ? i.to_s : i }
1041
- key_obj = {:inputs => clean_inputs, :dependencies => dependencies}
1041
+ deps_str = dependencies.collect{|d| Step === d ? d.short_path : d }
1042
+ key_obj = {:inputs => clean_inputs, :dependencies => deps_str }
1042
1043
  key_str = Misc.obj2str(key_obj)
1043
1044
  hash_str = Misc.digest(key_str)
1044
1045
  #Log.debug "Hash for '#{[taskname, jobname] * "/"}' #{hash_str} for #{key_str}"
@@ -85,6 +85,7 @@ class Step
85
85
  status = job.status.to_s
86
86
 
87
87
  if (status == 'error' && (job.recoverable_error? || job.dirty?)) ||
88
+ (job.noinfo? && Open.exists?(job.pid_file)) ||
88
89
  job.aborted? ||
89
90
  (job.done? && ! job.updated?) || (job.error? && ! job.updated?) ||
90
91
  (job.done? && job.dirty?) || (job.error? && job.dirty?) ||
@@ -118,6 +119,8 @@ class Step
118
119
 
119
120
  def execute_dependency(dependency, log = true)
120
121
  task_name = self.task_name
122
+ canfail_paths = self.canfail_paths
123
+ already_failed = []
121
124
  begin
122
125
 
123
126
  dependency.resolve_input_steps
@@ -132,17 +135,18 @@ class Step
132
135
  end
133
136
 
134
137
  dependency.status_lock.synchronize do
135
- if dependency.aborted? or (dependency.error? and dependency.recoverable_error?) or (!Open.remote?(dependency.path) && dependency.missing?)
138
+ if dependency.aborted? || (dependency.error? && dependency.recoverable_error? && ! canfail_paths.include?(dependency.path) && ! already_failed << dependency.path) || (!Open.remote?(dependency.path) && dependency.missing?)
136
139
  Log.warn "Cleaning dep. on exec #{Log.color :blue, dependency.path} (missing: #{dependency.missing?}; error #{dependency.error?})"
137
140
  dependency.clean
141
+ already_failed << dependency.path
138
142
  raise TryAgain
139
143
  end
140
144
  end
141
145
 
142
- if ! dependency.started? && ! dependency.error?
146
+ if ! (dependency.started? || dependency.error?)
143
147
  log_dependency_exec(dependency, :starting)
144
148
  dependency.run(true)
145
- raise TryAgain
149
+ raise TryAgain
146
150
  end
147
151
 
148
152
  dependency.grace
@@ -302,7 +306,7 @@ class Step
302
306
  Set.new(info[:canfail_paths])
303
307
  else
304
308
  canfail_paths = Set.new
305
- all_deps = rec_dependencies + [self]
309
+ all_deps = dependencies
306
310
  all_deps.each do |dep|
307
311
  next if canfail_paths.include? dep.path
308
312
  next unless ComputeDependency === dep && dep.canfail?
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.23.19
4
+ version: 5.23.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Vazquez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-24 00:00:00.000000000 Z
11
+ date: 2018-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake