[Ruby] One line to save God

Par défaut

We’ve had unexpecting interruptions in our Feevy updaters last weeks, and the error (which is still strange) came from inside God, it was unable to decide if a process was still running.

If you’ve the same kind of problem, with your god logging showing « kill: 1: No such process« , then change the exists? method in /usr/local/lib/ruby/gems/1.8/gems/god-0.5.0/lib/god/system/process.rb file, gem path might not be the same on your system.

# Return true if this process is running, false otherwise
def exists?
    # system("kill -0 #{@pid} &> /dev/null")
    ps_int('rss') != 0

Here is our configuration if some people can find where this line is causing problem: Ubuntu Gutsy, Ruby 1.8.6, God 0.5