Created
April 28, 2011 20:21
-
-
Save jkndrkn/947243 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
before_fork do | |
logger.formatter = Logger::Formatter.new | |
logger.info "Loading application..." | |
require(root_path + 'config/environment.rb') | |
Dir.chdir(RAILS_ROOT) | |
logger.info "Loading brain for DecisionPoint 'Insti', 'LMP'..." | |
Appraiser["LMP_Insti"] | |
ActiveRecord::Base.remove_connection | |
GC.copy_on_write_friendly = true if USING_REE | |
GC.disable | |
end | |
after_fork do | |
Kernel.srand(Process.pid) | |
ActiveRecord::Base.establish_connection | |
$0 = $0 + " " + Rails.env | |
NewRelic::Agent.manual_start :agent_enabled => true | |
en |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment