I have a Rails app that wants a DRb process to be alive before
starting. Using monit, one can prevent the mongrels from starting
based on the state of another process. Is there some way to monitor an
arbitrary process or processes as a condition of starting a given one.
E.g.:
%w{8000 8001 8002}.each do |port|
God.watch do |w|
w.name = "my-mongrel-#{port}"
w.depends_on "my-drb" # <== this is what I'm
trying to accomplish.
# ...
end
end
%2{24242}.each do |port| # maybe more ports later
God.watch do |w|
w.name = "my-drb"
# etc.
end
end
Any thoughts?
Thanks.