Commit c894d262 authored by 张彦钊's avatar 张彦钊

add

parent 8ed29868
...@@ -103,10 +103,10 @@ def search(): ...@@ -103,10 +103,10 @@ def search():
r = redis.StrictRedis.from_url('redis://:ReDis!GmTx*0aN9@172.16.40.173:6379') r = redis.StrictRedis.from_url('redis://:ReDis!GmTx*0aN9@172.16.40.173:6379')
cursor = 0 cursor = 0
while True: while True:
new_cursor,keys_list = r.scan(cursor,"device:latest:action:tag:names:update:flag:*",1000) new_cursor,keys_list = r.scan(cursor,"device:latest:action:tag:names:update:flag:*",2000)
if len(keys_list) > 0:
print(len(keys_list)) print(len(keys_list))
r.delete(*keys_list) r.delete(*keys_list)
# 循环一遍后结束 # 循环一遍后结束
if new_cursor == 0: if new_cursor == 0:
......
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