rbbt-util 5.26.167 → 5.26.168
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e40fba857594d4e21bb57da16268f22032c6d101ebaac110de8094cba38b12a7
|
4
|
+
data.tar.gz: 33b4251a885bb44b1ec45aab8e2aa2f96c4066c024e5133f3d28786c9b11aaa3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0aa7e9832fae143d5cb01fb728aa47d2cc9a78617791202681499bb7d90a6f3c76bb41d8d314c424c144d0ed2ac801acc42e1797d6f2f16781c43589f2e724a9
|
7
|
+
data.tar.gz: '084fd15a2fc4cb3513d41d1f5e51623073c713a92970869d0970e232af7ed5c110aab88521451c0706d2b723f0e1a51f4e1fcfdce34dcea6ef3acf9e6e434c5e'
|
data/lib/rbbt/util/open.rb
CHANGED
data/lib/rbbt/workflow.rb
CHANGED
@@ -540,12 +540,13 @@ module Workflow
|
|
540
540
|
|
541
541
|
def self.__load_step(path)
|
542
542
|
if Open.remote?(path) || Open.ssh?(path)
|
543
|
-
|
543
|
+
require 'rbbt/workflow/remote_workflow'
|
544
|
+
return RemoteWorkflow.load_path path
|
544
545
|
end
|
545
546
|
step = Step.new path
|
546
547
|
relocated = false
|
547
548
|
step.dependencies = (step.info[:dependencies] || []).collect do |task,name,dep_path|
|
548
|
-
if Open.exists?(dep_path) || Open.exists?(dep_path + '.info')
|
549
|
+
if Open.exists?(dep_path) || Open.exists?(dep_path + '.info') || Open.remote?(dep_path) || Open.ssh?(dep_path)
|
549
550
|
Workflow._load_step dep_path
|
550
551
|
else
|
551
552
|
new_path = relocate(path, dep_path)
|
@@ -559,6 +560,11 @@ module Workflow
|
|
559
560
|
end
|
560
561
|
|
561
562
|
def self.fast_load_step(path)
|
563
|
+
if Open.remote?(path) || Open.ssh?(path)
|
564
|
+
require 'rbbt/workflow/remote_workflow'
|
565
|
+
return RemoteWorkflow.load_path path
|
566
|
+
end
|
567
|
+
|
562
568
|
step = Step.new path
|
563
569
|
step.dependencies = nil
|
564
570
|
class << step
|
@@ -618,7 +624,7 @@ module Workflow
|
|
618
624
|
File.join(workdir, id)
|
619
625
|
end
|
620
626
|
task = task_for path
|
621
|
-
return remote_tasks[task].load_id(id) if remote_tasks
|
627
|
+
return remote_tasks[task].load_id(id) if remote_tasks && remote_tasks.include?(task)
|
622
628
|
return Workflow.load_step path
|
623
629
|
end
|
624
630
|
|
@@ -630,7 +636,7 @@ module Workflow
|
|
630
636
|
File.join(workdir, id)
|
631
637
|
end
|
632
638
|
task = task_for path
|
633
|
-
return remote_tasks[task].load_id(id) if remote_tasks
|
639
|
+
return remote_tasks[task].load_id(id) if remote_tasks && remote_tasks.include?(task)
|
634
640
|
return Workflow.fast_load_step path
|
635
641
|
end
|
636
642
|
|
@@ -57,6 +57,23 @@ class RemoteWorkflow
|
|
57
57
|
step.result_description = task_info(task)[:result_description]
|
58
58
|
step
|
59
59
|
end
|
60
|
+
|
61
|
+
def self.load_path(job_url)
|
62
|
+
parts = job_url.split("/")
|
63
|
+
name = parts.pop.split("?").first
|
64
|
+
task = parts.pop
|
65
|
+
workflow = parts.last
|
66
|
+
url = parts * "/"
|
67
|
+
|
68
|
+
step = RemoteStep.new url, task, nil
|
69
|
+
step.name = name
|
70
|
+
step.workflow = workflow
|
71
|
+
step.started = true
|
72
|
+
step.result_type = step.info[:result_type]
|
73
|
+
step.result_description = step.info[:result_description]
|
74
|
+
|
75
|
+
step
|
76
|
+
end
|
60
77
|
end
|
61
78
|
|
62
79
|
require 'rbbt/workflow/remote_workflow/driver'
|
@@ -2,7 +2,7 @@ require 'rbbt/workflow'
|
|
2
2
|
|
3
3
|
class RemoteStep < Step
|
4
4
|
|
5
|
-
attr_accessor :url, :base_url, :task, :base_name, :inputs, :input_types, :result_type, :result_description, :is_exec, :is_stream, :stream_input
|
5
|
+
attr_accessor :url, :base_url, :task, :base_name, :inputs, :input_types, :result_type, :result_description, :is_exec, :is_stream, :stream_input, :started
|
6
6
|
|
7
7
|
def initialize(base_url, task = nil, base_name = nil, inputs = nil, input_types = nil, result_type = nil, result_description = nil, is_exec = false, is_stream = false, stream_input = nil)
|
8
8
|
@base_url, @task, @base_name, @inputs, @input_types, @result_type, @result_description, @is_exec, @is_stream, @stream_input = base_url, task, base_name, inputs, input_types, result_type, result_description, is_exec, is_stream, stream_input
|
@@ -179,7 +179,7 @@ class RemoteStep < Step
|
|
179
179
|
end
|
180
180
|
|
181
181
|
def file(file)
|
182
|
-
@adaptor.get_raw(File.join(url, 'file', file))
|
182
|
+
@adaptor.get_raw(File.join(url, 'file', file.to_s))
|
183
183
|
end
|
184
184
|
|
185
185
|
def get_stream
|
@@ -32,10 +32,10 @@ class Step
|
|
32
32
|
|
33
33
|
path_mtime = begin
|
34
34
|
Open.mtime(path)
|
35
|
-
rescue
|
35
|
+
rescue Exception
|
36
36
|
nil
|
37
37
|
end
|
38
|
-
str = if
|
38
|
+
str = if ! (Open.remote?(path) || Open.ssh?(path)) && (Open.exists?(path) && $main_mtime && path_mtime && ($main_mtime - path_mtime) < -2)
|
39
39
|
prov_status_msg(status.to_s) << " " << [workflow, task, path].compact * " " << " (#{Log.color(:red, "Mtime out of sync") })"
|
40
40
|
else
|
41
41
|
prov_status_msg(status.to_s) << " " << [workflow, task, path].compact * " "
|
@@ -71,7 +71,7 @@ class Step
|
|
71
71
|
info[:task_name] = task
|
72
72
|
path = step.path
|
73
73
|
status = info[:status] || :missing
|
74
|
-
status = "remote" if Open.remote?(path)
|
74
|
+
status = "remote" if Open.remote?(path) || Open.ssh?(path)
|
75
75
|
name = info[:name] || File.basename(path)
|
76
76
|
status = :unsync if status == :done and not Open.exist?(path)
|
77
77
|
status = :notfound if status == :noinfo and not Open.exist?(path)
|