summaryrefslogtreecommitdiff
path: root/config/mail_room.yml
diff options
context:
space:
mode:
authorJacob Vosmaer <contact@jacobvosmaer.nl>2016-03-09 15:16:46 +0100
committerJacob Vosmaer <contact@jacobvosmaer.nl>2016-03-09 15:16:46 +0100
commitc46e6eff104891ca4e404605ad3bf302a3aad9c7 (patch)
tree36552d841679239cad915ddbb2e2721d89f8a962 /config/mail_room.yml
parent500337c4b23700a30876c6d2f8e7c612f8114432 (diff)
downloadgitlab-ce-c46e6eff104891ca4e404605ad3bf302a3aad9c7.tar.gz
Parse config/resque.yml in one place only
Diffstat (limited to 'config/mail_room.yml')
-rw-r--r--config/mail_room.yml9
1 files changed, 2 insertions, 7 deletions
diff --git a/config/mail_room.yml b/config/mail_room.yml
index f266a70ee0d..aed55f74eab 100644
--- a/config/mail_room.yml
+++ b/config/mail_room.yml
@@ -2,6 +2,7 @@
<%
require "yaml"
require "json"
+require_relative "lib/gitlab/redis_config"
rails_env = ENV["RAILS_ENV"] || ENV["RACK_ENV"] || "development"
@@ -17,13 +18,7 @@ if File.exists?(config_file)
config['mailbox'] = "inbox" if config['mailbox'].nil?
if config['enabled'] && config['address'] && config['address'].include?('%{key}')
- redis_config_file = "config/resque.yml"
- redis_url =
- if File.exists?(redis_config_file)
- YAML.load_file(redis_config_file)[rails_env]
- else
- "redis://localhost:6379"
- end
+ redis_url = Gitlab::RedisConfig.new(rails_env).url
%>
-
:host: <%= config['host'].to_json %>