Commit 585bbd4c authored by 张彦钊's avatar 张彦钊

add

parent 6535a54b
......@@ -114,8 +114,23 @@ def search():
cursor = new_cursor
def find():
r = redis.StrictRedis.from_url('redis://:ReDis!GmTx*0aN9@172.16.40.173:6379')
cursor = 0
while True:
new_cursor,keys_list = r.scan(cursor,"cold_topic:device_id:*",2000)
if len(keys_list) > 0:
print(len(keys_list))
# 循环一遍后结束
if new_cursor == 0:
break
cursor = new_cursor
if __name__ == "__main__":
search()
find()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment