Sha256: 774e8406d53e1494495129c80c5ceecbcd530c82643fbd086595da83a44ade1d

Contents?: true

Size: 506 Bytes

Versions: 9

Compression:

Stored size: 506 Bytes

Contents

require 'open4'

module Process::Naf
  class RunnerLog < ::Af::Application

    opt :invocation_uuid,
        "unique identifer used for runner logs",
        default: `uuidgen`

    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

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
naf-2.1.3 app/models/process/naf/runner_log.rb
naf-2.1.2 app/models/process/naf/runner_log.rb
naf-2.1.1 app/models/process/naf/runner_log.rb
naf-2.1.0 app/models/process/naf/runner_log.rb
naf-2.0.4 app/models/process/naf/runner_log.rb
naf-2.0.3 app/models/process/naf/runner_log.rb
naf-2.0.2 app/models/process/naf/runner_log.rb
naf-2.0.1 app/models/process/naf/runner_log.rb
naf-2.0.0 app/models/process/naf/runner_log.rb