0
- require File.join(File.dirname(__FILE__), *%w[.. .. lib god])
0
ENV['GOD_TEST_RAILS_ROOT'] || abort("Set a rails root for testing in an environment variable called GOD_TEST_RAILS_ROOT")
0
RAILS_ROOT = ENV['GOD_TEST_RAILS_ROOT']
0
- # g.pid_file_directory =
0
- puts "Notifying: #{str}"
0
+ w.name = "local-
#{port}"
0
- w.start = "mongrel_rails start -P ./log/mongrel.pid -c #{RAILS_ROOT} -p
3001 -d"
0
+ w.start = "mongrel_rails start -P ./log/mongrel.pid -c #{RAILS_ROOT} -p
#{port} -d"
0
w.restart = "mongrel_rails restart -P ./log/mongrel.pid -c #{RAILS_ROOT}"
0
w.stop = "mongrel_rails stop -P ./log/mongrel.pid -c #{RAILS_ROOT}"
0
- w.restart_grace = 5.seconds
0
- w.stop_grace = 5.seconds
0
w.pid_file = File.join(RAILS_ROOT, "log/mongrel.pid")
0
# clean pid files before start if necessary
0
w.behavior(:clean_pid_file)
0
- w.behavior(:notify_when_flapping) do |b|
0
- b.seconds = 60.seconds
0
- b.notifier = SimpleNotifier
0
# determine the state on startup
0
w.transition(:init, { true => :up, false => :start }) do |on|
0
on.condition(:process_running) do |c|
0
@@ -73,5 +48,14 @@ God.watch do |w|
0
+ on.condition(:http_response_code) do |c|
0
+ c.timeout = 10.seconds
0
\ No newline at end of file
Comments
No one has commented yet.