better error handling

This commit is contained in:
Sebastian Serth
2020-05-12 18:52:08 +02:00
parent 75b0767677
commit 2b7170b202
2 changed files with 2 additions and 2 deletions

View File

@ -453,7 +453,7 @@ class DockerClient
Timeout.timeout(@execution_environment.permitted_execution_time.to_i) do
# TODO: check phusion doku again if we need -i -t options here
# https://stackoverflow.com/questions/363223/how-do-i-get-both-stdout-and-stderr-to-go-to-the-terminal-and-a-log-file
output = container.exec(['bash', '-c', "#{command} 1> >(tee -a /tmp/stdout.log) 2> >(tee -a /tmp/stderr.log >&2); rm /tmp/std*.log"], tty: false)
output = container.exec(['bash', '-c', "#{command} 1> >(tee -a /tmp/stdout.log) 2> >(tee -a /tmp/stderr.log >&2); rm -f /tmp/std*.log"], tty: false)
end
Rails.logger.debug 'output from container.exec'
Rails.logger.debug output