Skip to content

Instantly share code, notes, and snippets.

@rubio
Created October 17, 2012 14:48
Show Gist options
  • Save rubio/3905926 to your computer and use it in GitHub Desktop.
Save rubio/3905926 to your computer and use it in GitHub Desktop.
#! /usr/bin/env python
import time
import redis
cn = redis.Redis(host="10.0.15.1", port=6379)
cnt = 0
with open('3460.lst', 'rb') as f:
for key in f:
key = key.rstrip('\n')
print "borrando: %s res=%s" % (key, cn.delete(key))
if cnt > 1000:
print 'cervecita...'
time.sleep(10.0)
cnt = 0
cnt = cnt + 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment