diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-12-03 14:49:06 -0600 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-12-03 14:49:06 -0600 |
commit | 59253ce0dd4f92bc59c9cd3ca982c9616f5c6c00 (patch) | |
tree | d41dedf8325d44de1eed2e548c0a655077b3ce2d /config | |
parent | 65afa0fe019c5c411c336975e306a573df01586e (diff) |
clear out dead sidekiq job locks & add lock manager to sidekiq's dashboard to let admins get rid of stuck locks
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/sidekiq.rb | 5 | ||||
-rw-r--r-- | config/routes.rb | 1 |
2 files changed, 6 insertions, 0 deletions
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| diff --git a/config/routes.rb b/config/routes.rb index 5d7b8df97..25655e7ac 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -2,6 +2,7 @@ require 'sidekiq/web' require 'sidekiq-scheduler/web' +require 'sidekiq_unique_jobs/web' Sidekiq::Web.set :session_secret, Rails.application.secrets[:secret_key_base] |