2 require File.join(File.dirname(__FILE__), *%w[.. .. lib god])
5 RAILS_ROOT = "/Users/tom/dev/gravatar2"
8 god.interval = 5 # seconds
13 w.start = "mongrel_rails start -P ./log/mongrel.pid -d"
14 w.stop = "mongrel_rails stop -P ./log/mongrel.pid"
17 pid_file = File.join(RAILS_ROOT, "log/mongrel.pid")
20 start.condition(:process_not_running) do |c|
25 w.restart_if do |restart|
26 restart.condition(:memory_usage) do |c|
28 c.above = (50 * 1024) # 50mb
32 restart.condition(:cpu_usage) do |c|
34 c.above = 10 # percent