[Ruby] One line to save God

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
end

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

Tags: , ,

Great!! Since yesterday night feevy updating proccess has had no interruption!

You are great, bro!

You saved my day. I had exactly the same problem and now it’s gone :-)
I have posted a bug report to God so hopefully it will be fixed in the next release so we don’t have to hack things.

http://rubyforge.org/tracker/index.php?func=detail&aid=17112&group_id=3845&atid=14814