reorder so integration2 connects to correct redis port

This commit is contained in:
Jonas Lundqvist 2012-05-06 22:04:33 +02:00
parent 436ec039c8
commit 819bb95dbd

View file

@ -6,10 +6,10 @@ if !AppConfig.single_process_mode?
if redis_to_go = ENV["REDISTOGO_URL"] if redis_to_go = ENV["REDISTOGO_URL"]
uri = URI.parse(redis_to_go) uri = URI.parse(redis_to_go)
Resque.redis = Redis.new(:host => uri.host, :port => uri.port, :password => uri.password) 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)
elsif ENV['RAILS_ENV']== 'integration2' elsif ENV['RAILS_ENV']== 'integration2'
Resque.redis = Redis.new(:host => 'localhost', :port => 6380) Resque.redis = Redis.new(:host => 'localhost', :port => 6380)
elsif AppConfig[:redis_url]
Resque.redis = Redis.new(:host => AppConfig[:redis_url], :port => 6379)
end end
end end