rbbt-util 5.23.29 → 5.23.30

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d79b37d85261eb8752a28f32688774224fc9d99f
4
- data.tar.gz: 3d3b98478b25ef4185166e437bcf40deedffcd66
3
+ metadata.gz: 46009fb0f9f3cf772708eab0fa79e5c6c92e4119
4
+ data.tar.gz: 2317148b52eecea200d1f7579d0094dbfbd553e0
5
5
  SHA512:
6
- metadata.gz: d82e5d8c6f47d92b887d757e8f6f317fb4fd5284f756027de4a70ecaf785d4577e8f13b854d549969d122069adccc7e5b7e7e497ba9af5e6adf1d51ce9903694
7
- data.tar.gz: c6e7f5d41afd0fb98004bdcc01a8b1d5a4576d5f68b42e753d0be302e63b7baa97fc8cea4e252300bf6176841f2793e533130c398365b58bc637a30c60b17ca5
6
+ metadata.gz: 13ac3808249e0c62124bc0755afe12011a55c1b5f381b9bb6ecacf0861208a5042f8cb9364358a51804b1860cb4dfcbb43938e14231f834813eb7eab4dbc03b2
7
+ data.tar.gz: c99ea47d4bd81b6c52f1e18d08eccc909e05018dcaa2539362e98277960ed4cb42b7f40b63c71a3d72f096bdc0527f3cd9241af4313d13cf18a7fa026464cce5
data/lib/rbbt/monitor.rb CHANGED
@@ -147,7 +147,7 @@ module Rbbt
147
147
  next if tasks and not tasks.include? task
148
148
 
149
149
  #cmd = "find -L '#{ taskdir }/' -not \\( -path \"#{taskdir}/*.files/*\" -prune \\) -not -name '*.pid' -not -name '*.notify' -not -name '\\.*' 2>/dev/null"
150
- cmd = "find -L '#{ taskdir }/' -not \\( -path \"#{taskdir}/*.files/*\" -prune \\) -not -name '*.pid' -not -name '*.notify' -not -name '\\.*' \\( -not -type d -o -name '*.files' \\) 2>/dev/null"
150
+ cmd = "find -L '#{ taskdir }/' -not \\( -path \"#{taskdir}/.info/*\" -prune \\) -not \\( -path \"#{taskdir}/*.files/*\" -prune \\) -not -name '*.pid' -not -name '*.notify' -not -name '\\.*' \\( -not -type d -o -name '*.files' \\) 2>/dev/null"
151
151
 
152
152
  files = CMD.cmd(cmd, :pipe => true)
153
153
  TSV.traverse files, :type => :array, :into => jobs, :_bar => "Finding jobs in #{ taskdir }" do |file|
@@ -129,7 +129,7 @@ module Path
129
129
  @path ||= {}
130
130
  rsearch_paths = (resource and resource.respond_to?(:search_paths)) ? resource.search_paths : nil
131
131
  key_elems = [where, caller_lib, rsearch_paths, paths]
132
- key = Misc.digest(key_elems.inspect)
132
+ key = Misc.obj2digest(key_elems)
133
133
  self.sub!('~/', Etc.getpwuid.dir + '/') if self.include? "~"
134
134
 
135
135
  return @path[key] if @path[key]
@@ -251,6 +251,8 @@ module Misc
251
251
  obj = Annotated.purge(obj) if Annotated === obj
252
252
 
253
253
  str = case obj
254
+ when nil
255
+ 'nil'
254
256
  when TrueClass
255
257
  'true'
256
258
  when FalseClass
@@ -652,43 +652,45 @@ module Workflow
652
652
  name = name.to_sym
653
653
  task = tasks[name]
654
654
  raise "No '#{name}' task in '#{self.to_s}' Workflow" if task.nil?
655
- description = task.description
656
- result_description = task.result_description
657
- result_type = task.result_type
658
- inputs = rec_inputs(name).uniq
659
- input_types = rec_input_types(name)
660
- input_descriptions = rec_input_descriptions(name)
661
- input_use = rec_input_use(name)
662
- input_defaults = rec_input_defaults(name)
663
- input_options = rec_input_options(name)
664
- export = case
665
- when (synchronous_exports.include?(name.to_sym) or synchronous_exports.include?(name.to_s))
666
- :synchronous
667
- when (asynchronous_exports.include?(name.to_sym) or asynchronous_exports.include?(name.to_s))
668
- :asynchronous
669
- when (exec_exports.include?(name.to_sym) or exec_exports.include?(name.to_s))
670
- :exec
671
- when (stream_exports.include?(name.to_sym) or stream_exports.include?(name.to_s))
672
- :stream
673
- else
674
- :none
675
- end
676
-
677
-
678
- dependencies = task_dependencies[name].select{|dep| String === dep or Symbol === dep}
679
- { :id => File.join(self.to_s, name.to_s),
680
- :description => description,
681
- :export => export,
682
- :inputs => inputs,
683
- :input_types => input_types,
684
- :input_descriptions => input_descriptions,
685
- :input_defaults => input_defaults,
686
- :input_options => input_options,
687
- :input_use => input_use,
688
- :result_type => result_type,
689
- :result_description => result_description,
690
- :dependencies => dependencies
691
- }
655
+ @@task_info ||= {}
656
+ @@task_info[name] ||= begin description = task.description
657
+ result_description = task.result_description
658
+ result_type = task.result_type
659
+ inputs = rec_inputs(name).uniq
660
+ input_types = rec_input_types(name)
661
+ input_descriptions = rec_input_descriptions(name)
662
+ input_use = rec_input_use(name)
663
+ input_defaults = rec_input_defaults(name)
664
+ input_options = rec_input_options(name)
665
+ export = case
666
+ when (synchronous_exports.include?(name.to_sym) or synchronous_exports.include?(name.to_s))
667
+ :synchronous
668
+ when (asynchronous_exports.include?(name.to_sym) or asynchronous_exports.include?(name.to_s))
669
+ :asynchronous
670
+ when (exec_exports.include?(name.to_sym) or exec_exports.include?(name.to_s))
671
+ :exec
672
+ when (stream_exports.include?(name.to_sym) or stream_exports.include?(name.to_s))
673
+ :stream
674
+ else
675
+ :none
676
+ end
677
+
678
+
679
+ dependencies = task_dependencies[name].select{|dep| String === dep or Symbol === dep}
680
+ { :id => File.join(self.to_s, name.to_s),
681
+ :description => description,
682
+ :export => export,
683
+ :inputs => inputs,
684
+ :input_types => input_types,
685
+ :input_descriptions => input_descriptions,
686
+ :input_defaults => input_defaults,
687
+ :input_options => input_options,
688
+ :input_use => input_use,
689
+ :result_type => result_type,
690
+ :result_description => result_description,
691
+ :dependencies => dependencies
692
+ }
693
+ end
692
694
  end
693
695
 
694
696
  def rec_dependencies(taskname)
@@ -300,22 +300,23 @@ class Step
300
300
  end
301
301
 
302
302
  def canfail_paths
303
- return Set.new if ! Open.exists?(info_file)
303
+ return Set.new if done? && ! Open.exists?(info_file)
304
304
 
305
- if !relocated && info[:canfail_paths]
306
- Set.new(info[:canfail_paths])
305
+ if !relocated && info[:canfail]
306
+ Set.new(info[:canfail])
307
307
  else
308
308
  canfail_paths = Set.new
309
309
  all_deps = dependencies
310
310
  all_deps.each do |dep|
311
311
  next if canfail_paths.include? dep.path
312
+ canfail_paths += dep.canfail_paths
312
313
  next unless ComputeDependency === dep && dep.canfail?
313
314
  canfail_paths << dep.path
314
315
  canfail_paths += dep.rec_dependencies.collect{|d| d.path }
315
316
  end
316
317
  canfail_paths
317
318
  begin
318
- set_info :canfail_paths, canfail_paths.to_a
319
+ set_info :canfail, canfail_paths.to_a
319
320
  rescue Errno::EROFS
320
321
  end
321
322
  canfail_paths
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.29
4
+ version: 5.23.30
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-11-20 00:00:00.000000000 Z
11
+ date: 2018-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake