Method: WorkflowManager::Server#get_script

Defined in:
lib/workflow_manager/server.rb

#get_script(job_id) ⇒ Object



523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
# File 'lib/workflow_manager/server.rb', line 523

def get_script(job_id)
  script_file = nil
  @logs.transaction do |logs|
    script_file = logs[job_id.to_s]
  end
  if script_file
    script_file = script_file.gsub(/_o\.log/,'')
  end
  script = if script_file and File.exist?(script_file)
             File.read(script_file)
           else
             'no script file'
           end
  script
end