rbbt-util 5.26.30 → 5.26.31
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 +4 -4
- data/lib/rbbt/hpc.rb +1 -1
- data/lib/rbbt/workflow.rb +15 -3
- data/lib/rbbt/workflow/step/run.rb +3 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cb2336c9d10c8c90f466b98d533accfa60cd2d7485ef3172df146891d5d35c62
|
|
4
|
+
data.tar.gz: 4033671c874b9aaf6b9313291010aea9979110b9075377f6018b18495be08516
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0bde169f4c862fd7dd2752bfb9c4dc3083a1c90547cd069ab5c9618c7e4b3ac1502fb8c5392608e06f3d04f1bc2166bce67d3538f5be14ef574f36de218468ca
|
|
7
|
+
data.tar.gz: e870e508f1923b918538f1ddf390cbbfac08b0daf926758937e3fd5e0553749c2222d8f54d1953f934a90ebe7253ea5711b12b9adf07aebb6b248f74551408e0
|
data/lib/rbbt/hpc.rb
CHANGED
|
@@ -259,12 +259,12 @@ EOF
|
|
|
259
259
|
target = File.expand_path(sync)
|
|
260
260
|
coda +=<<-EOF
|
|
261
261
|
rsync -avt "#{source}/" "#{target}/" &>> #{fsync}
|
|
262
|
+
sync_es="$?"
|
|
262
263
|
find '#{target}' -type l -ls | awk '$13 ~ /^#{target.gsub('/','\/')}/ { sub("#{source}", "#{target}", $13); print $11, $13 }' | while read A B; do rm $A; ln -s $B $A; done
|
|
263
264
|
EOF
|
|
264
265
|
|
|
265
266
|
if contain && (wipe_container == "post" || wipe_container == "both")
|
|
266
267
|
coda +=<<-EOF
|
|
267
|
-
sync_es="$?"
|
|
268
268
|
singularity exec -e -C -H "$CONTAINER_DIR" "$SINGULARITY_IMG" rbbt system clean -f &>> #{fsync}
|
|
269
269
|
singularity exec -e -C -H "$CONTAINER_DIR" "$SINGULARITY_IMG" rm -v /dev/shm/sem.*.{in,out,process} /dev/shm/sem.Session-PID.*.sem 2> /dev/null >> #{fsync}
|
|
270
270
|
if [ $sync_es == '0' ]; then
|
data/lib/rbbt/workflow.rb
CHANGED
|
@@ -511,6 +511,18 @@ module Workflow
|
|
|
511
511
|
Rbbt.var.jobs[end_part].find
|
|
512
512
|
end
|
|
513
513
|
|
|
514
|
+
def self.relocate_dependency(main, dep)
|
|
515
|
+
dep_path = dep.path
|
|
516
|
+
path = main.path
|
|
517
|
+
if Open.exists?(dep_path) || Open.exists?(dep_path + '.info')
|
|
518
|
+
dep
|
|
519
|
+
else
|
|
520
|
+
new_path = relocate(path, dep_path)
|
|
521
|
+
relocated = true if Open.exists?(new_path) || Open.exists?(new_path + '.info')
|
|
522
|
+
Workflow._load_step new_path
|
|
523
|
+
end
|
|
524
|
+
end
|
|
525
|
+
|
|
514
526
|
def self.__load_step(path)
|
|
515
527
|
step = Step.new path
|
|
516
528
|
relocated = false
|
|
@@ -519,7 +531,7 @@ module Workflow
|
|
|
519
531
|
Workflow._load_step dep_path
|
|
520
532
|
else
|
|
521
533
|
new_path = relocate(path, dep_path)
|
|
522
|
-
relocated = true if Open.exists?(new_path)
|
|
534
|
+
relocated = true if Open.exists?(new_path) || Open.exists?(new_path + '.info')
|
|
523
535
|
Workflow._load_step new_path
|
|
524
536
|
end
|
|
525
537
|
end
|
|
@@ -534,12 +546,12 @@ module Workflow
|
|
|
534
546
|
class << step
|
|
535
547
|
def dependencies
|
|
536
548
|
@dependencies ||= (self.info[:dependencies] || []).collect do |task,name,dep_path|
|
|
537
|
-
dep = if Open.exists?(dep_path)
|
|
549
|
+
dep = if Open.exists?(dep_path) || Open.exists?(dep_path + '.info')
|
|
538
550
|
relocate = false
|
|
539
551
|
Workflow.fast_load_step dep_path
|
|
540
552
|
else
|
|
541
553
|
new_path = Workflow.relocate(path, dep_path)
|
|
542
|
-
relocated = true if Open.exists?(new_path)
|
|
554
|
+
relocated = true if Open.exists?(new_path) || Open.exists?(new_path + '.info')
|
|
543
555
|
Workflow.fast_load_step new_path
|
|
544
556
|
end
|
|
545
557
|
dep.relocated = relocated
|
|
@@ -112,13 +112,14 @@ class Step
|
|
|
112
112
|
end
|
|
113
113
|
|
|
114
114
|
def updatable?
|
|
115
|
-
(ENV["RBBT_UPDATE_ALL_JOBS"] == 'true' || Open.exists?(info_file)) && ! relocated?
|
|
115
|
+
(ENV["RBBT_UPDATE_ALL_JOBS"] == 'true' || Open.exists?(info_file)) && ! (relocated? && done?)
|
|
116
116
|
end
|
|
117
117
|
|
|
118
118
|
def dependency_checks
|
|
119
119
|
rec_dependencies.
|
|
120
120
|
select{|dependency| ! (defined? WorkflowRESTClient and WorkflowRESTClient::RemoteStep === dependency) }.
|
|
121
|
-
|
|
121
|
+
collect{|dependency| Workflow.relocate_dependency self, dependency}.
|
|
122
|
+
select{|dependency| Open.exists?(dependency.path) || Open.exists?(dependency.info_file) }.
|
|
122
123
|
select{|dependency| ! Open.remote?(dependency.path) }.
|
|
123
124
|
select{|dependency| dependency.updatable? }.
|
|
124
125
|
select{|dependency| ! dependency.error? }
|