Skip to content

Commit 0337b6b

Browse files
rtomaykodefunkt
authored andcommitted
Fix stdout buffering in child process
1 parent 3cbfd5a commit 0337b6b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/resque/worker.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,10 @@ def startup
207207
prune_dead_workers
208208
run_hook :before_first_fork
209209
register_worker
210+
211+
# Fix buffering so we can `rake resque:work > resque.log` and
212+
# get output from the child in there.
213+
$stdout.sync = true
210214
end
211215

212216
# Enables GC Optimizations if you're running REE.

0 commit comments

Comments
 (0)