diff options
Diffstat (limited to 'config/unicorn.rb.example.development')
-rw-r--r-- | config/unicorn.rb.example.development | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/config/unicorn.rb.example.development b/config/unicorn.rb.example.development index 5712549a66d..f31df66015a 100644 --- a/config/unicorn.rb.example.development +++ b/config/unicorn.rb.example.development @@ -7,7 +7,7 @@ check_client_connection false before_fork do |server, worker| # the following is highly recommended for Rails + "preload_app true" # as there's no need for the master process to hold a connection - defined?(ActiveRecord::Base) and + defined?(ActiveRecord::Base) && ActiveRecord::Base.connection.disconnect! if /darwin/ =~ RUBY_PLATFORM @@ -27,6 +27,6 @@ after_fork do |server, worker| require 'rbtrace' if ENV['ENABLE_RBTRACE'] # the following is *required* for Rails + "preload_app true", - defined?(ActiveRecord::Base) and + defined?(ActiveRecord::Base) && ActiveRecord::Base.establish_connection end |