Skip to content

Commit

Permalink
set sync true on stdio.log (brightroll#85)
Browse files Browse the repository at this point in the history
* set sync true on stdio.log

* remove extra flush in queue.rb
  • Loading branch information
bwitt authored May 8, 2017
1 parent 49a96ba commit d417f5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/queue.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d417f5f

Please sign in to comment.