diff options
author | Jonne Haß <me@mrzyx.de> | 2012-09-15 20:23:22 +0400 |
---|---|---|
committer | Jonne Haß <me@mrzyx.de> | 2012-09-15 20:23:22 +0400 |
commit | 48dcccf7b3904072e41645a143df75adc3c818a0 (patch) | |
tree | ca2a6e1cb0c0b71aff31515e03f77d5c53bef6e6 /config/unicorn.rb | |
parent | f1631084d38ee5c0dabe7def0995822683e7f4ea (diff) |
Unify redis initialization
REDISTOGO_URL is now deprecated in favor of REDIS_URL which is supported by the redis gem too.
Diffstat (limited to 'config/unicorn.rb')
-rw-r--r-- | config/unicorn.rb | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/config/unicorn.rb b/config/unicorn.rb index 7d943d226..7c6810b7e 100644 --- a/config/unicorn.rb +++ b/config/unicorn.rb @@ -47,12 +47,7 @@ after_fork do |server, worker| # copy pasta from resque.rb because i'm a bad person if !AppConfig.single_process_mode? - if redis_to_go = ENV["REDISTOGO_URL"] - uri = URI.parse(redis_to_go) - Resque.redis = Redis.new(:host => uri.host, :port => uri.port, :password => uri.password) - elsif AppConfig[:redis_url] - Resque.redis = Redis.new(:host => AppConfig[:redis_url], :port => 6379) - end + Resque.redis = AppConfig.get_redis_instance end # Enable this line to have the workers run as different user/group |