Forked from camallen/clear_sidekiq_locks_redis_cli.sh
Created
December 19, 2018 15:53
-
-
Save zwolf/83ba5e2d6412854a75c9422aa0e3ed74 to your computer and use it in GitHub Desktop.
Clear out sidekiq unique & congestion locks from redis
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ssh onto the redis node in question and run these cmds | |
# congestion:* keys are for https://github.com/parrish/Sidekiq-Congestion | |
# uniquejobs:* https://github.com/mhenrixon/sidekiq-unique-jobs | |
# get a count of the locks | |
redis-cli -n 0 --scan --pattern 'congestion:*' | wc -l | |
redis-cli -n 0 --scan --pattern 'uniquejobs:*' | wc -l | |
# clear them for both key namespaces | |
redis-cli -n 0 --scan --pattern 'congestion:*' | xargs redis-cli -n 0 DEL | |
redis-cli -n 0 --scan --pattern 'uniquejobs:*' | xargs redis-cli -n 0 DEL | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment