diff options
author | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2014-08-11 20:26:20 +0400 |
---|---|---|
committer | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2014-08-27 18:32:59 +0400 |
commit | 6d785abaa9367173d62300b8000a68554e4e293c (patch) | |
tree | cf91a1aa8e0f29b0fe9b3fe82a81ecbaaeeebde2 /config | |
parent | c0b146899b46892485727102f552a1db324bb2ef (diff) |
Rename resque_url to redis_url_string
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/7_cache_settings.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/config/initializers/7_cache_settings.rb b/config/initializers/7_cache_settings.rb index 7dbaf2e1c9e..ce7e8c5a650 100644 --- a/config/initializers/7_cache_settings.rb +++ b/config/initializers/7_cache_settings.rb @@ -1,14 +1,14 @@ redis_config_file = Rails.root.join('config', 'resque.yml') -resque_url = if File.exists?(redis_config_file) - YAML.load_file(redis_config_file)[Rails.env] - else - "redis://localhost:6379" - end +redis_url_string = if File.exists?(redis_config_file) + YAML.load_file(redis_config_file)[Rails.env] + else + "redis://localhost:6379" + end # Redis::Store does not handle Unix sockets well, so let's do it for them -redis_config_hash = Redis::Store::Factory.extract_host_options_from_uri(resque_url) -redis_uri = URI.parse(resque_url) +redis_config_hash = Redis::Store::Factory.extract_host_options_from_uri(redis_url_string) +redis_uri = URI.parse(redis_url_string) if redis_uri.scheme == 'unix' redis_config_hash[:path] = redis_uri.path end |