Skip to content

Instantly share code, notes, and snippets.

@72squared
Created October 21, 2015 22:05
Show Gist options
  • Save 72squared/bc2bb3d78aee1a077f3f to your computer and use it in GitHub Desktop.
Save 72squared/bc2bb3d78aee1a077f3f to your computer and use it in GitHub Desktop.
from rediscluster import RedisCluster
startup_nodes = [{"host": "127.0.0.1", "port": 7000}]
r = RedisCluster(startup_nodes=startup_nodes, max_connections=32, decode_responses=True)
for i in xrange(1000000):
d = str(i)
r.set(d, d)
res = r.get(d)
if res != d:
raise Exception('expected %s but got %s' %( d, res))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment