lib/mutx/background_jobs/workers/alerts_worker.rb in mutx-0.2.7 vs lib/mutx/background_jobs/workers/alerts_worker.rb in mutx-0.2.8
- old
+ new
@@ -16,20 +16,18 @@
PTY.spawn("ruby #{args['path']}") do |stdout, stdin, pid|
begin
stdout.each do |line|
stringio.puts line
end
- rescue Errno::EIO => e
- stringio.puts e.message
- stringio.puts e.backtrace
+ rescue Errno::EIO
ensure
Process.wait pid
status = $?.exitstatus
end
end
rescue => e
- stringio.puts e.message
- stringio.puts e.backtrace
+ puts e.message
+ puts e.backtrace
raise e
ensure
@alert.update_status(status, info: stringio.string)
end
end
\ No newline at end of file