diff options
author | Claire <claire.github-309c@sitedethib.com> | 2021-03-15 11:26:59 +0100 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2021-03-15 11:26:59 +0100 |
commit | eac4a3e9c82b0ff8ade2e8b86282387df6039868 (patch) | |
tree | d16cecb0e7c74dc8498074ce5e0670a4b3c67b2f /config/initializers/sidekiq.rb | |
parent | 995ad2af30d4838d07d68f0e89f1868307d1e478 (diff) | |
parent | e89e976e924f558d13893726b3edda7b428988fd (diff) |
Merge branch 'main' into glitch-soc/merge-upstream
Diffstat (limited to 'config/initializers/sidekiq.rb')
-rw-r--r-- | config/initializers/sidekiq.rb | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb index f2733562f..9d348ddd0 100644 --- a/config/initializers/sidekiq.rb +++ b/config/initializers/sidekiq.rb @@ -14,14 +14,30 @@ Sidekiq.configure_server do |config| chain.add SidekiqErrorHandler end - config.death_handlers << lambda do |job, _ex| - digest = job['lock_digest'] - SidekiqUniqueJobs::Digests.delete_by_digest(digest) if digest + config.server_middleware do |chain| + chain.add SidekiqUniqueJobs::Middleware::Server + end + + config.client_middleware do |chain| + chain.add SidekiqUniqueJobs::Middleware::Client end + + SidekiqUniqueJobs::Server.configure(config) end Sidekiq.configure_client do |config| config.redis = redis_params + + config.client_middleware do |chain| + chain.add SidekiqUniqueJobs::Middleware::Client + end end Sidekiq.logger.level = ::Logger.const_get(ENV.fetch('RAILS_LOG_LEVEL', 'info').upcase.to_s) + +SidekiqUniqueJobs.configure do |config| + config.reaper = :ruby + config.reaper_count = 1000 + config.reaper_interval = 600 + config.reaper_timeout = 150 +end |