Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-30 09:08:49 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-30 09:08:49 +0300
commit6305f1dc00870f6e0635e2e850538a00bbd00bda (patch)
tree8a518cae3805b8d7269bfacc8ae60aa441fadb22 /config
parent1d388ed855838a2d50588c131f9f23815f148344 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config')
-rw-r--r--config/initializers/database_config.rb10
-rw-r--r--config/initializers/geo.rb16
2 files changed, 14 insertions, 12 deletions
diff --git a/config/initializers/database_config.rb b/config/initializers/database_config.rb
index b5490fc4719..52897ad549d 100644
--- a/config/initializers/database_config.rb
+++ b/config/initializers/database_config.rb
@@ -10,6 +10,16 @@ def log_pool_size(db, previous_pool_size, current_pool_size)
Gitlab::AppLogger.debug(log_message.join(' '))
end
+Gitlab.ee do
+ # We need to initialize the Geo database before
+ # setting the Geo DB connection pool size.
+ if File.exist?(Rails.root.join('config/database_geo.yml'))
+ Rails.application.configure do
+ config.geo_database = config_for(:database_geo)
+ end
+ end
+end
+
# When running on multi-threaded runtimes like Puma or Sidekiq,
# set the number of threads per process as the minimum DB connection pool size.
# This is to avoid connectivity issues as was documented here:
diff --git a/config/initializers/geo.rb b/config/initializers/geo.rb
index 4cc9fbf49b2..3278dc9e484 100644
--- a/config/initializers/geo.rb
+++ b/config/initializers/geo.rb
@@ -1,17 +1,9 @@
# frozen_string_literal: true
Gitlab.ee do
- if File.exist?(Rails.root.join('config/database_geo.yml'))
- Rails.application.configure do
- config.geo_database = config_for(:database_geo)
- end
- end
-
- begin
- if Gitlab::Geo.connected? && Gitlab::Geo.primary?
- Gitlab::Geo.current_node&.update_clone_url!
- end
- rescue => e
- warn "WARNING: Unable to check/update clone_url_prefix for Geo: #{e}"
+ if Gitlab::Geo.connected? && Gitlab::Geo.primary?
+ Gitlab::Geo.current_node&.update_clone_url!
end
+rescue => e
+ warn "WARNING: Unable to check/update clone_url_prefix for Geo: #{e}"
end