lib/rbbt/workflow/util/archive.rb in rbbt-util-5.26.83 vs lib/rbbt/workflow/util/archive.rb in rbbt-util-5.26.84
- old
+ new
@@ -22,18 +22,17 @@
rec_dependencies = Set.new
deps = [self.path]
seen = Set.new
while deps.any?
path = deps.shift
- dep = Step.new path
+ dep = Workflow.load_step path
seen << dep.path
- dep.info[:dependencies].each do |task, name, path|
- dep = Step.new path
+ dep.dependencies.each do |dep|
next if seen.include? dep.path
deps << dep.path
rec_dependencies << dep.path
- end if dep.info[:dependencies]
+ end if dep.dependencies
end
rec_dependencies.each do |path|
Step.link_job path, tmpdir
end
@@ -70,11 +69,11 @@
deps = [step.path]
seen = Set.new
while deps.any?
path = deps.shift
- dep = Step.new path
+ dep = Workflow.load_step path
seen << dep.path
dep.relocated = !!relocate
dep.load_dependencies_from_info
@@ -84,12 +83,10 @@
deps << dep.path
rec_dependencies << dep.path
end if dep.info[:dependencies]
end
- rec_dependencies.each do |path|
- next unless File.exists?(path)
- dep = Step.new path
+ rec_dependencies.each do |dep|
job_files << dep.path
job_files << dep.files_dir if Dir.glob(dep.files_dir + '/*').any?
job_files << dep.info_file if File.exists?(dep.info_file)
end
end