2017-05-04 06:18:13 +09:00
|
|
|
# frozen_string_literal: true
|
2016-03-25 10:50:48 +09:00
|
|
|
|
2017-05-08 02:42:32 +09:00
|
|
|
namespace = ENV.fetch('REDIS_NAMESPACE') { nil }
|
|
|
|
redis_params = { url: ENV['REDIS_URL'] }
|
|
|
|
|
|
|
|
if namespace
|
|
|
|
redis_params [:namespace] = namespace
|
|
|
|
end
|
|
|
|
|
2016-03-25 10:50:48 +09:00
|
|
|
Sidekiq.configure_server do |config|
|
2017-05-08 02:42:32 +09:00
|
|
|
config.redis = redis_params
|
2017-09-07 23:44:15 +09:00
|
|
|
config.client_middleware do |chain|
|
|
|
|
chain.add Mastodon::UniqueRetryJobMiddleware
|
|
|
|
end
|
2016-03-25 10:50:48 +09:00
|
|
|
end
|
|
|
|
|
|
|
|
Sidekiq.configure_client do |config|
|
2017-05-08 02:42:32 +09:00
|
|
|
config.redis = redis_params
|
2017-09-06 03:56:20 +09:00
|
|
|
config.client_middleware do |chain|
|
|
|
|
chain.add Mastodon::UniqueRetryJobMiddleware
|
|
|
|
end
|
2016-03-25 10:50:48 +09:00
|
|
|
end
|