Module: Executor::NFSStorage

Defined in:
lib/hyperflow-amqp-executor/nfs_storage.rb

Instance Method Summary collapse

Instance Method Details

#stage_inObject



5
6
7
8
9
10
# File 'lib/hyperflow-amqp-executor/nfs_storage.rb', line 5

def stage_in
  @job.inputs.each do |file|
    Executor::logger.debug "[#{@id}] Copying #{file.name} to tmpdir"
    FileUtils.copy(@job.options.workdir + file.name, @workdir + "/" + file.name)
  end
end

#stage_outObject



12
13
14
15
16
17
# File 'lib/hyperflow-amqp-executor/nfs_storage.rb', line 12

def stage_out
  @job.outputs.each do |file|
    Executor::logger.debug "[#{@id}] Copying #{file.name} from tmpdir"
    FileUtils.copy(@workdir + "/" + file.name, @job.options.workdir + file.name)
  end
end

#workdir(&block) ⇒ Object



19
20
21
# File 'lib/hyperflow-amqp-executor/nfs_storage.rb', line 19

def workdir(&block)
  Dir::mktmpdir(&block)
end