From f5c1309b12f569f7b925f7694a6bae980c5fef55 Mon Sep 17 00:00:00 2001 From: Tom Werner Date: Mon, 9 Jul 2007 11:26:46 -0700 Subject: [PATCH] fix sample configs, add announce template --- History.txt | 2 +- examples/gravatar.god | 10 ++++++++-- examples/local.god | 6 +++--- site/index.html | 12 ++++++++---- 4 files changed, 20 insertions(+), 10 deletions(-) diff --git a/History.txt b/History.txt index 35af5a7..6ca7f84 100644 --- a/History.txt +++ b/History.txt @@ -1,4 +1,4 @@ -== 1.0.0 / 2007-06-11 +== 0.1.0 / 2007-07-07 * 1 major enhancement * Birthday! diff --git a/examples/gravatar.god b/examples/gravatar.god index 1e300c6..6109f48 100644 --- a/examples/gravatar.god +++ b/examples/gravatar.god @@ -1,3 +1,5 @@ +# run with: god start -c /path/to/gravatar.god +# # This is the actual config file used to keep the mongrels of # gravatar.com running. @@ -8,8 +10,11 @@ God.meddle do |god| god.watch do |w| w.name = "gravatar2-mongrel-#{port}" w.interval = 30 # seconds - w.start = "mongrel_rails cluster::start --only #{port} -c #{RAILS_ROOT}" - w.stop = "mongrel_rails cluster::stop --only #{port} -c #{RAILS_ROOT}" + w.start = "mongrel_rails cluster::start --only #{port} \ + -C #{RAILS_ROOT}/config/mongrel_cluster.yml" + w.stop = "mongrel_rails cluster::stop --only #{port} \ + -C #{RAILS_ROOT}/config/mongrel_cluster.yml" + w.grace = 10 # seconds pid_file = File.join(RAILS_ROOT, "log/mongrel.#{port}.pid") @@ -19,6 +24,7 @@ God.meddle do |god| w.start_if do |start| start.condition(:process_not_running) do |c| + c.interval = 5 # seconds c.pid_file = pid_file end end diff --git a/examples/local.god b/examples/local.god index 9fdeacc..3701a6e 100644 --- a/examples/local.god +++ b/examples/local.god @@ -2,15 +2,14 @@ # and running on your Mac. # Run with: -# god local.god +# god start -c /path/to/local.god RAILS_ROOT = "/Users/tom/dev/powerset/querytopia" God.meddle do |god| - god.interval = 5 # seconds - god.watch do |w| w.name = "local-3000" + w.interval = 5 # seconds w.start = "mongrel_rails start -P ./log/mongrel.pid -c #{RAILS_ROOT} -d" w.stop = "mongrel_rails stop -P ./log/mongrel.pid -c #{RAILS_ROOT}" w.grace = 5 @@ -48,6 +47,7 @@ God.meddle do |god| # clear old session files god.watch do |w| w.name = "local-session-cleanup" + w.interval = 60 # seconds w.cwd = File.join(RAILS_ROOT, 'tmp/sessions') w.start = lambda do Dir['ruby_sess.*'].select { |f| File.mtime(f) < Time.now - (7 * 24 * 60 * 60) }.each { |f| File.delete(f) } diff --git a/site/index.html b/site/index.html index a5f2337..45aceef 100644 --- a/site/index.html +++ b/site/index.html @@ -238,8 +238,10 @@ God.meddle do |god| god.watch do |w| w.name = "gravatar2-mongrel-#{port}" w.interval = 30 # seconds - w.start = "mongrel_rails cluster::start --only #{port} -c #{RAILS_ROOT}" - w.stop = "mongrel_rails cluster::stop --only #{port} -c #{RAILS_ROOT}" + w.start = "mongrel_rails cluster::start --only #{port} \ + -C #{RAILS_ROOT}/config/mongrel_cluster.yml" + w.stop = "mongrel_rails cluster::stop --only #{port} \ + -C #{RAILS_ROOT}/config/mongrel_cluster.yml" w.grace = 10 # seconds pid_file = File.join(RAILS_ROOT, "log/mongrel.#{port}.pid") @@ -293,8 +295,10 @@ end
    god.watch do |w|
       w.name = "gravatar2-mongrel-#{port}"
       w.interval = 30 # seconds
-      w.start = "mongrel_rails cluster::start --only #{port} -c #{RAILS_ROOT}"
-      w.stop = "mongrel_rails cluster::stop --only #{port} -c #{RAILS_ROOT}"
+      w.start = "mongrel_rails cluster::start --only #{port} \
+        -C #{RAILS_ROOT}/config/mongrel_cluster.yml"
+      w.stop = "mongrel_rails cluster::stop --only #{port} \
+        -C #{RAILS_ROOT}/config/mongrel_cluster.yml"
       w.grace = 10 # seconds
       
       ...
-- 
2.11.4.GIT