server/files/etc/god/master.conf in pauldowman-ec2onrails-0.9.10 vs server/files/etc/god/master.conf in pauldowman-ec2onrails-0.9.10.0

- old
+ new

@@ -1,27 +1,34 @@ # For TextMate users, change the language type (at bottom of window, next to line/column counter, to ruby) # -applog(nil, :debug, "GOD: loading /etc/god/master.conf") +applog(nil, :info, "loading /etc/god/master.conf") require '/usr/local/ec2onrails/lib/god_helper' +require '/usr/local/ec2onrails/lib/utils' require "fileutils" include GodHelper -APP_ROOT = "/mnt/app" +APP_ROOT = "/mnt/app/current" - @configs = GodHelper::Configs.new God.pid_file_directory = "/var/run/god" God.load "/etc/god/*.god" +applog(nil, :info, "about to load application specific configs at #{APP_ROOT}/config/god/*.god") -#at the end, we want to init the correct services +God.load "#{APP_ROOT}/config/god/*.god" -pid = fork do +# at the end, we want to init the correct services +# need to put it into a thread because god is not finished +# initalizing at this point, so we need to let it finish +# so we can call init_services, which calls god directly +# +# using a fork copies over the processing space, causing +# god to reload again..and again...and again... +Thread.new do sleep(2) - applog(nil, :debug, "initializing services....") - system("/usr/local/ec2onrails/bin/init_services.rb") + applog(nil, :info, "initializing services....") + system("/usr/local/ec2onrails/bin/init_services") end -::Process.detach pid