Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
ffm-baseline
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ML
ffm-baseline
Commits
c894d262
Commit
c894d262
authored
Nov 06, 2019
by
张彦钊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
8ed29868
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
delete_key.py
delete_key.py
+4
-4
No files found.
delete_key.py
View file @
c894d262
...
@@ -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:*"
,
1
000
)
new_cursor
,
keys_list
=
r
.
scan
(
cursor
,
"device:latest:action:tag:names:update:flag:*"
,
2
000
)
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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment