Skip to content

Instantly share code, notes, and snippets.

@camallen
Created November 2, 2018 13:37
Show Gist options
  • Save camallen/f3cd1d7e70627bd215a9911f9a95858f to your computer and use it in GitHub Desktop.
Save camallen/f3cd1d7e70627bd215a9911f9a95858f to your computer and use it in GitHub Desktop.
Clear out sidekiq unique & congestion locks from redis
# 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