Created
April 17, 2017 19:20
-
-
Save wongJonathan/7f283044e3c1722951c1bda95faae697 to your computer and use it in GitHub Desktop.
Reads n number of elasticache objects
This file contains hidden or 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
import redis | |
import random | |
r = redis.StrictRedis(host='jwong-test-2-001.nkrcoi.0001.usw2.cache.amazonaws.com', port=6379, db=0) | |
n = 1000 | |
for counter in range(0,n+1): | |
rand = random.randint(0,n) | |
print r.get('session_id_{0}'.format(rand)) | |
print counter |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment