Low commit activity in last 3 years
No release in over a year
Tool for cleaning unique digests which were stuck because of SIGKILL or any other accident.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 7.0, < 8.0
 Project Readme

SidekiqUniqueDigestsCleaner

SidekiqUniqueDigestsCleaner is a simple tool for cleaning up stuck Unique Digests in Sidekiq. The most common example of such a situation occurs for Heroku users when the service restarts all instances once per day. As a result, it sends SIGTERM for shutdown and after 30 seconds, SIGKILL, so Sidekiq is unable to return all not-finished jobs to the queue. Due to this problem, job information is lost. However, the digests are still retained, but there is no way of adding a new job with the same worker and arguments.

Installation

Install the gem as usual:

$ gem install sidekiq_unique_digests_cleaner

or just add this line to your Gemfile:

gem 'sidekiq_unique_digests_cleaner'

Using

List of all stuck digests

SidekiqUniqueDigestsCleaner.stuck_digests # returns the list of digests which are stuck

Clean them

SidekiqUniqueDigestsCleaner.clean_unique_digests # remove all stuck digests

For using it automatically on Sidekiq start add this line to your Sidekiq initializer

 Sidekiq.configure_server do |config|
    # Some code for your Sidekiq setup
    SidekiqUniqueDigestsCleaner.clean_unique_digests
  end

Todos

  • Add tests

License

MIT