From f48039933435f32a0f7aeb24a491cb5ba12eb516 Mon Sep 17 00:00:00 2001 From: Brett Walker Date: Fri, 12 Oct 2018 14:08:13 -0500 Subject: Fix rubocop complaining about unicorn.rb --- config/unicorn.rb.example.development | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'config/unicorn.rb.example.development') 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 -- cgit v1.2.3