added redis to go support in redis
This commit is contained in:
parent
2f9ea6cd43
commit
c1b46e557f
1 changed files with 7 additions and 2 deletions
|
|
@ -2,8 +2,13 @@ require 'resque'
|
|||
|
||||
Resque::Plugins::Timeout.timeout = 120
|
||||
|
||||
if !AppConfig.single_process_mode? && AppConfig[:redis_url]
|
||||
Resque.redis = Redis.new(:host => AppConfig[:redis_url], :port => 6379)
|
||||
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
|
||||
end
|
||||
|
||||
if AppConfig.single_process_mode?
|
||||
|
|
|
|||
Loading…
Reference in a new issue