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:
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