rb-inotify does not work well with Foreman
Closed this issue · 1 comments
mufid commented
I want to make a worker with inotify. I am using 32-Bit Ubuntu 12.04. Yet, I don't know why code involving rb-inotify
won't work well with current inotify.
Test: https://github.com/mufid/foreman-test (it is just a small test repo)
Init:
bundle install
The Procfile
main: bundle exec rake inotify
Test with foreman will freeze the process. No output. The inotify process also won't work.
foreman start
13:11:42 main.1 | started with pid 10134
# then the program freeze, no reaction.
But without foreman, the program actually works.
rake inotify
# --- output ---
# inotify: running...
# Watching at .
# Notifier up and running. Patchuuu!
Using Honcho does the same thing
honcho start
00:11:42 main.1 | started with pid 10555
# no reaction : /
mufid commented
Woops, this is stdout issue in Foreman. Closed. Thanks!
Fixed with setting this:
$stdout.sync = true