This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
2017-05-03 14:18:13 -07:00
|
|
|
# frozen_string_literal: true
|
2016-03-24 18:50:48 -07:00
|
|
|
|
2017-05-07 10:42:32 -07:00
|
|
|
namespace = ENV.fetch('REDIS_NAMESPACE') { nil }
|
|
|
|
redis_params = { url: ENV['REDIS_URL'] }
|
|
|
|
|
|
|
|
if namespace
|
|
|
|
redis_params [:namespace] = namespace
|
|
|
|
end
|
|
|
|
|
2016-03-24 18:50:48 -07:00
|
|
|
Sidekiq.configure_server do |config|
|
2017-05-07 10:42:32 -07:00
|
|
|
config.redis = redis_params
|
2018-02-24 10:16:11 -08:00
|
|
|
|
|
|
|
config.server_middleware do |chain|
|
|
|
|
chain.add SidekiqErrorHandler
|
|
|
|
end
|
2016-03-24 18:50:48 -07:00
|
|
|
end
|
|
|
|
|
|
|
|
Sidekiq.configure_client do |config|
|
2017-05-07 10:42:32 -07:00
|
|
|
config.redis = redis_params
|
2016-03-24 18:50:48 -07:00
|
|
|
end
|