Module: Executor

Included in:
Paradeiser::Job, Paradeiser::Scheduler
Defined in:
lib/paradeiser/executor.rb

Constant Summary collapse

BIN_PAR =
'par'

Instance Method Summary collapse

Instance Method Details

#atObject



10
11
12
# File 'lib/paradeiser/executor.rb', line 10

def at
  'at'
end

#exec(cmd) ⇒ Object



4
5
6
7
8
# File 'lib/paradeiser/executor.rb', line 4

def exec(cmd)
  out, err, status = Open3.capture3(cmd)
  raise err if 0 < status.exitstatus
  [out, err]
end

#queueObject



14
15
16
# File 'lib/paradeiser/executor.rb', line 14

def queue
  ENV['PAR_AT_QUEUE'] || 'p'
end