2017-05-03 21:18:13 +00:00
|
|
|
# frozen_string_literal: true
|
2016-03-25 01:50:48 +00:00
|
|
|
|
2017-05-07 17:42:32 +00:00
|
|
|
namespace = ENV.fetch('REDIS_NAMESPACE') { nil }
|
|
|
|
redis_params = { url: ENV['REDIS_URL'] }
|
|
|
|
|
|
|
|
if namespace
|
|
|
|
redis_params [:namespace] = namespace
|
|
|
|
end
|
|
|
|
|
2016-03-25 01:50:48 +00:00
|
|
|
Sidekiq.configure_server do |config|
|
2017-05-07 17:42:32 +00:00
|
|
|
config.redis = redis_params
|
2016-03-25 01:50:48 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
Sidekiq.configure_client do |config|
|
2017-05-07 17:42:32 +00:00
|
|
|
config.redis = redis_params
|
2016-03-25 01:50:48 +00:00
|
|
|
end
|