Dependencies (like monit)?

75 views
Skip to first unread message

s.ross

unread,
Jun 13, 2008, 1:42:58 PM6/13/08
to god.rb
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.

Roman Gaufman

unread,
Oct 17, 2012, 6:10:09 AM10/17/12
to god...@googlegroups.com, cwd...@gmail.com
Did you ever find a solution to this?

captainf

unread,
Oct 18, 2012, 6:34:03 AM10/18/12
to god...@googlegroups.com, cwd...@gmail.com
I tried to put a dependency system into god
https://github.com/Ferengee/god-extensions/blob/master/etc/god/extensions/dependencies.rb

Older versions of god had a dependency_graph.rb which is now also included in the repository

This patch adds an extra state for the watches that wait on a not yet up beeing dependency
Reply all
Reply to author
Forward
0 new messages