1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

store REDIS_URL in a constant

This commit is contained in:
Charlie Somerville 2014-06-08 13:44:35 +10:00
parent 925b80e85e
commit 2efd7b6ddc

View file

@ -31,9 +31,9 @@ Sidekiq.logger.level = Logger::ERROR
Sidekiq::Test = Minitest::Test
require 'sidekiq/redis_connection'
redis_url = ENV['REDIS_URL'] || 'redis://localhost/15'
REDIS = Sidekiq::RedisConnection.create(:url => redis_url, :namespace => 'testy')
REDIS_URL = ENV['REDIS_URL'] || 'redis://localhost/15'
REDIS = Sidekiq::RedisConnection.create(:url => REDIS_URL, :namespace => 'testy')
Sidekiq.configure_client do |config|
config.redis = { :url => redis_url, :namespace => 'testy' }
config.redis = { :url => REDIS_URL, :namespace => 'testy' }
end