Skip to content

Instantly share code, notes, and snippets.

@lloydmeta
Last active December 18, 2015 02:39
Show Gist options
  • Save lloydmeta/5712607 to your computer and use it in GitHub Desktop.
Save lloydmeta/5712607 to your computer and use it in GitHub Desktop.
Clear out nonce set that has, regrettably gotten out of hand thanks to race condition on setting expiry.
def cleanout_nonce(key)
loop do
print "."
break unless $redis.spop key
end
end
cleanout_nonce("nonce_set")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment