Martin Sarsale <[email protected]> wrote: > Dear all: > > I would like to execute some code when the Unicorn worker is killed > with SIGKILL (ie, incrementing a counter in graphite), what's the > "nice" way to do this? > > E, [2012-09-26T17:51:47.776065 #28499] ERROR -- : worker=4 PID:28520 > timeout (61s > 60s), killing > E, [2012-09-26T17:51:47.785081 #28499] ERROR -- : reaped > #<Process::Status: pid 28520 SIGKILL (signal 9)> worker=4 > I, [2012-09-26T17:51:47.786659 #29010] INFO -- : worker=4 spawned pid=29010 > I, [2012-09-26T17:51:47.786994 #29010] INFO -- : Refreshing Gem list
I'm not sure about "nice" :) I just go with: tail -F /path/to/log | script-which-reads-from-stdin I use tail from GNU coreutils for -F. Newer coreutils uses inotify on Linux, too. I prefer using an external script since I can use a different language and also update it freely without redeploying the app. > ps: thanks for unicorn, it feels great. You're welcome :) _______________________________________________ Unicorn mailing list - [email protected] http://rubyforge.org/mailman/listinfo/mongrel-unicorn Do not quote signatures (like this one) or top post when replying
