2017-05-03 14:18:13 -07:00
|
|
|
# frozen_string_literal: true
|
2016-03-24 18:50:48 -07:00
|
|
|
|
2021-12-26 15:47:20 -08:00
|
|
|
require_relative '../../lib/sidekiq_error_handler'
|
|
|
|
|
2016-03-24 18:50:48 -07:00
|
|
|
Sidekiq.configure_server do |config|
|
2021-05-09 01:40:17 -07:00
|
|
|
config.redis = REDIS_SIDEKIQ_PARAMS
|
2018-02-24 10:16:11 -08:00
|
|
|
|
|
|
|
config.server_middleware do |chain|
|
|
|
|
chain.add SidekiqErrorHandler
|
|
|
|
end
|
2020-03-31 12:59:03 -07:00
|
|
|
|
2021-03-15 03:17:43 -07:00
|
|
|
config.server_middleware do |chain|
|
|
|
|
chain.add SidekiqUniqueJobs::Middleware::Server
|
|
|
|
end
|
|
|
|
|
|
|
|
config.client_middleware do |chain|
|
|
|
|
chain.add SidekiqUniqueJobs::Middleware::Client
|
2020-03-31 12:59:03 -07:00
|
|
|
end
|
2021-03-15 03:17:43 -07:00
|
|
|
|
|
|
|
SidekiqUniqueJobs::Server.configure(config)
|
2016-03-24 18:50:48 -07:00
|
|
|
end
|
|
|
|
|
|
|
|
Sidekiq.configure_client do |config|
|
2021-05-09 01:40:17 -07:00
|
|
|
config.redis = REDIS_SIDEKIQ_PARAMS
|
2021-03-15 03:17:43 -07:00
|
|
|
|
|
|
|
config.client_middleware do |chain|
|
|
|
|
chain.add SidekiqUniqueJobs::Middleware::Client
|
|
|
|
end
|
2016-03-24 18:50:48 -07:00
|
|
|
end
|
2018-04-10 07:08:28 -07:00
|
|
|
|
2020-03-20 20:04:54 -07:00
|
|
|
Sidekiq.logger.level = ::Logger.const_get(ENV.fetch('RAILS_LOG_LEVEL', 'info').upcase.to_s)
|
2021-03-15 03:17:43 -07:00
|
|
|
|
|
|
|
SidekiqUniqueJobs.configure do |config|
|
|
|
|
config.reaper = :ruby
|
|
|
|
config.reaper_count = 1000
|
|
|
|
config.reaper_interval = 600
|
|
|
|
config.reaper_timeout = 150
|
|
|
|
end
|