Merge branch 'bw-fix-unicorn-rubocop' into 'master'
Fix rubocop complaining about unicorn.rb See merge request gitlab-org/gitlab-ce!22332
This commit is contained in:
commit
79ba389201
2 changed files with 4 additions and 4 deletions
|
@ -95,7 +95,7 @@ end
|
||||||
before_fork do |server, worker|
|
before_fork do |server, worker|
|
||||||
# the following is highly recommended for Rails + "preload_app true"
|
# the following is highly recommended for Rails + "preload_app true"
|
||||||
# as there's no need for the master process to hold a connection
|
# as there's no need for the master process to hold a connection
|
||||||
defined?(ActiveRecord::Base) and
|
defined?(ActiveRecord::Base) &&
|
||||||
ActiveRecord::Base.connection.disconnect!
|
ActiveRecord::Base.connection.disconnect!
|
||||||
|
|
||||||
# The following is only recommended for memory/DB-constrained
|
# 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)
|
# server.listen(addr, :tries => -1, :delay => 5, :tcp_nopush => true)
|
||||||
|
|
||||||
# the following is *required* for Rails + "preload_app true",
|
# the following is *required* for Rails + "preload_app true",
|
||||||
defined?(ActiveRecord::Base) and
|
defined?(ActiveRecord::Base) &&
|
||||||
ActiveRecord::Base.establish_connection
|
ActiveRecord::Base.establish_connection
|
||||||
|
|
||||||
# reset prometheus client, this will cause any opened metrics files to be closed
|
# reset prometheus client, this will cause any opened metrics files to be closed
|
||||||
|
|
|
@ -7,7 +7,7 @@ check_client_connection false
|
||||||
before_fork do |server, worker|
|
before_fork do |server, worker|
|
||||||
# the following is highly recommended for Rails + "preload_app true"
|
# the following is highly recommended for Rails + "preload_app true"
|
||||||
# as there's no need for the master process to hold a connection
|
# as there's no need for the master process to hold a connection
|
||||||
defined?(ActiveRecord::Base) and
|
defined?(ActiveRecord::Base) &&
|
||||||
ActiveRecord::Base.connection.disconnect!
|
ActiveRecord::Base.connection.disconnect!
|
||||||
|
|
||||||
if /darwin/ =~ RUBY_PLATFORM
|
if /darwin/ =~ RUBY_PLATFORM
|
||||||
|
@ -27,6 +27,6 @@ after_fork do |server, worker|
|
||||||
require 'rbtrace' if ENV['ENABLE_RBTRACE']
|
require 'rbtrace' if ENV['ENABLE_RBTRACE']
|
||||||
|
|
||||||
# the following is *required* for Rails + "preload_app true",
|
# the following is *required* for Rails + "preload_app true",
|
||||||
defined?(ActiveRecord::Base) and
|
defined?(ActiveRecord::Base) &&
|
||||||
ActiveRecord::Base.establish_connection
|
ActiveRecord::Base.establish_connection
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue