From 59253ce0dd4f92bc59c9cd3ca982c9616f5c6c00 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Tue, 3 Dec 2019 14:49:06 -0600 Subject: clear out dead sidekiq job locks & add lock manager to sidekiq's dashboard to let admins get rid of stuck locks --- config/initializers/sidekiq.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'config/initializers') diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb index 7f8a40d7b..08d682d23 100644 --- a/config/initializers/sidekiq.rb +++ b/config/initializers/sidekiq.rb @@ -13,6 +13,11 @@ Sidekiq.configure_server do |config| config.server_middleware do |chain| chain.add SidekiqErrorHandler end + + config.death_handlers << ->(job, _ex) do + digest = job['unique_digest'] + SidekiqUniqueJobs::Digests.delete_by_digest(digest) if digest + end end Sidekiq.configure_client do |config| -- cgit