Class: Process::Naf::RunnerLog

Inherits:
Af::Application
  • Object
show all
Defined in:
app/models/process/naf/runner_log.rb

Instance Method Summary collapse

Instance Method Details

#workObject



10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'app/models/process/naf/runner_log.rb', line 10

def work
  log_file = ::Logical::Naf::LogFile.new("#{::Naf::PREFIX_PATH}/#{::Naf.schema_name}/runners/#{@invocation_uuid}/")
  log_file.open

  while $stdin.gets
    begin
      log_file << $_.rstrip
    ensure
      log_file.write
    end
  end

  log_file.close
end