diff options
author | Robert Speicher <robert@gitlab.com> | 2018-10-12 20:48:32 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2018-10-12 20:48:32 +0000 |
commit | 79ba38920144191320df1e6529b8feab4acef758 (patch) | |
tree | 074f20c9d8bb41331619238748f3320a1fc9a97f | |
parent | ed8d6e8c8053479e8db546b684dc4aeb725c6ac8 (diff) | |
parent | f48039933435f32a0f7aeb24a491cb5ba12eb516 (diff) | |
download | gitlab-ce-79ba38920144191320df1e6529b8feab4acef758.tar.gz |
Merge branch 'bw-fix-unicorn-rubocop' into 'master'
Fix rubocop complaining about unicorn.rb
See merge request gitlab-org/gitlab-ce!22332
-rw-r--r-- | config/unicorn.rb.example | 4 | ||||
-rw-r--r-- | config/unicorn.rb.example.development | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/config/unicorn.rb.example b/config/unicorn.rb.example index 020e9a00d87..e06cce3e97a 100644 --- a/config/unicorn.rb.example +++ b/config/unicorn.rb.example @@ -95,7 +95,7 @@ end 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! # The following is only recommended for memory/DB-constrained @@ -133,7 +133,7 @@ after_fork do |server, worker| # server.listen(addr, :tries => -1, :delay => 5, :tcp_nopush => true) # the following is *required* for Rails + "preload_app true", - defined?(ActiveRecord::Base) and + defined?(ActiveRecord::Base) && ActiveRecord::Base.establish_connection # reset prometheus client, this will cause any opened metrics files to be closed 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 |