Created
March 26, 2015 05:46
-
-
Save mindware/459b34f933d1914e2020 to your computer and use it in GitHub Desktop.
Atomically delete all resque keys from redis (requires you have enough memory to handle all keys)
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
EVAL "return redis.call('DEL', unpack(redis.call('KEYS', ARGV[1] .. '*')))" 0 resque: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you need to delete more keys than you have memory for in your server:
for _,k in ipairs(redis.call('keys', ARGV[1])) do
redis.call('del', k)
end