lib/rbbt/workflow/remote/ssh/adaptor.rb in rbbt-util-5.26.87 vs lib/rbbt/workflow/remote/ssh/adaptor.rb in rbbt-util-5.26.88

- old
+ new

@@ -1,22 +1,8 @@ -module WorkflowSSHClient - def self.__prepare_inputs_for_restclient(inputs) - inputs.each do |k,v| - if v.respond_to? :path and not v.respond_to? :original_filename - class << v - def original_filename - File.expand_path(path) - end - end - end +require 'rbbt/workflow/remote/ssh/driver' - if Array === v and v.empty? - inputs[k] = "EMPTY_ARRAY" - end - end - end - +module WorkflowSSHClient def workflow_description WorkflowSSHClient.get_raw(File.join(url, 'description')) end def documentation @@ -24,24 +10,24 @@ @documention end def task_info(task) @task_info ||= IndiferentHash.setup({}) - @task_info[task] if @task_info[task].nil? - task_info = WorkflowSSHClient.get_json(File.join(url, task.to_s, 'info')) + task_info = WorkflowSSHClient.get_json(File.join(@base_url, task.to_s)) task_info = WorkflowSSHClient.fix_hash(task_info) - task_info[:result_type] = task_info[:result_type].to_sym - task_info[:export] = task_info[:export].to_sym + task_info[:result_type] = task_info[:result_type].to_sym if task_info[:result_type] + task_info[:export] = task_info[:export].to_sym if task_info[:export] task_info[:input_types] = WorkflowSSHClient.fix_hash(task_info[:input_types], true) task_info[:inputs] = task_info[:inputs].collect{|input| input.to_sym } - @task_info[task] = task_info + @task_info[task] = IndiferentHash.setup(task_info) end - @task_info[task] + + IndiferentHash.setup(@task_info[task]) end def tasks @tasks ||= Hash.new do |hash,task_name| info = @task_info[task_name] @@ -69,10 +55,7 @@ def init_remote_tasks @task_info = IndiferentHash.setup(WorkflowSSHClient.get_json(url)) @exec_exports = @stream_exports = @synchronous_exports = [] @asynchronous_exports = @task_info.keys - end - - def self.execute_job(base_url, task, task_params, cache_type) end end