debian-mirror-gitlab/config/initializers/redis_config.rb
2016-04-02 18:10:28 +05:30

12 lines
311 B
Ruby

# This is a quick hack to get ExclusiveLease working in GitLab 8.5
module Gitlab
REDIS_URL = begin
redis_config_file = Rails.root.join('config/resque.yml')
if File.exists?(redis_config_file)
YAML.load_file(redis_config_file)[Rails.env]
else
'redis://localhost:6379'
end
end
end