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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-08-19 12:08:42 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-08-19 12:08:42 +0300
commitb76ae638462ab0f673e5915986070518dd3f9ad3 (patch)
treebdab0533383b52873be0ec0eb4d3c66598ff8b91 /lib/gitlab/setup_helper.rb
parent434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff)
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'lib/gitlab/setup_helper.rb')
-rw-r--r--lib/gitlab/setup_helper.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/gitlab/setup_helper.rb b/lib/gitlab/setup_helper.rb
index 7ed1958a8d0..751405f1045 100644
--- a/lib/gitlab/setup_helper.rb
+++ b/lib/gitlab/setup_helper.rb
@@ -21,7 +21,7 @@ module Gitlab
end
rescue Errno::EEXIST
puts 'Skipping config.toml generation:'
- puts 'A configuration file already exists.'
+ puts "A configuration file for #{config_path} already exists."
rescue ArgumentError => e
puts 'Skipping config.toml generation:'
puts e.message
@@ -32,7 +32,7 @@ module Gitlab
extend Gitlab::SetupHelper
class << self
def configuration_toml(dir, _, _)
- config = { redis: { URL: redis_url } }
+ config = { redis: { URL: redis_url, DB: redis_db } }
TomlRB.dump(config)
end
@@ -41,6 +41,10 @@ module Gitlab
Gitlab::Redis::SharedState.url
end
+ def redis_db
+ Gitlab::Redis::SharedState.params.fetch(:db, 0)
+ end
+
def get_config_path(dir, _)
File.join(dir, 'config_path')
end