Commit 6d785aba authored by Jacob Vosmaer's avatar Jacob Vosmaer

Rename resque_url to redis_url_string

parent c0b14689
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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment