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:
parent
925b80e85e
commit
2efd7b6ddc
1 changed files with 3 additions and 3 deletions
|
@ -31,9 +31,9 @@ Sidekiq.logger.level = Logger::ERROR
|
||||||
Sidekiq::Test = Minitest::Test
|
Sidekiq::Test = Minitest::Test
|
||||||
|
|
||||||
require 'sidekiq/redis_connection'
|
require 'sidekiq/redis_connection'
|
||||||
redis_url = ENV['REDIS_URL'] || 'redis://localhost/15'
|
REDIS_URL = ENV['REDIS_URL'] || 'redis://localhost/15'
|
||||||
REDIS = Sidekiq::RedisConnection.create(:url => redis_url, :namespace => 'testy')
|
REDIS = Sidekiq::RedisConnection.create(:url => REDIS_URL, :namespace => 'testy')
|
||||||
|
|
||||||
Sidekiq.configure_client do |config|
|
Sidekiq.configure_client do |config|
|
||||||
config.redis = { :url => redis_url, :namespace => 'testy' }
|
config.redis = { :url => REDIS_URL, :namespace => 'testy' }
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue