From d417f5fa4f6f4c527530e44766cf667f47a6b16d Mon Sep 17 00:00:00 2001 From: Brian Witt Date: Mon, 8 May 2017 11:26:55 -0700 Subject: [PATCH] set sync true on stdio.log (#85) * set sync true on stdio.log * remove extra flush in queue.rb --- code/queue.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/queue.rb b/code/queue.rb index f4227e3..f83748f 100644 --- a/code/queue.rb +++ b/code/queue.rb @@ -338,9 +338,9 @@ def run_queue_script!(msg) IO.for_fd(child_rd_fd).close rescue nil f = File.open(job_path + "/stdio.log", "a") + f.sync = true pfx = "#{Process.pid} - #{Time.now} -" f.write("\n#{pfx} RQ START - #{script_path}\n") - f.flush $stdin.close $stdout.reopen f