Skip to content

Instantly share code, notes, and snippets.

@mitgr81
Created June 19, 2013 17:36
Show Gist options
  • Save mitgr81/5816216 to your computer and use it in GitHub Desktop.
Save mitgr81/5816216 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import random
import redis_wrap
print "All hashes %s " % redis_wrap.SYSTEMS['default'].keys('*')
in_progress_pushes = redis_wrap.get_hash('http://pants.com/ribble')
print "I gotz %s" % in_progress_pushes.keys()
in_progress_pushes['channel'] = random.randint(1040, 1045)
print "All hashes %s " % redis_wrap.SYSTEMS['default'].keys('*')
in_progress_pushes['complete'] = random.randint(0, 2)
print in_progress_pushes['complete']
if int(in_progress_pushes['complete']) > 0:
print "deleting"
del in_progress_pushes['complete']
del in_progress_pushes['channel']
print "I gotz %s again" % in_progress_pushes.keys()
print "I gotz %s again" % in_progress_pushes.values()
for key in in_progress_pushes.keys():
print "here's %s" % in_progress_pushes[key]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment