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
16dba7ac
Commit
16dba7ac
authored
5 years ago
by
张彦钊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change test file
parent
62d71c5b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
monitor.py
monitor.py
+9
-8
No files found.
monitor.py
View file @
16dba7ac
...
...
@@ -132,6 +132,7 @@ def answer_write(device_id,cid):
else
:
r
.
set
(
key
,
json
.
dumps
(
cids
))
r
.
expire
(
key
,
7
*
24
*
60
*
60
)
print
(
"bucunza"
)
except
Exception
as
e
:
...
...
@@ -198,22 +199,22 @@ def diary_write(device_id,cid):
cursor
.
execute
(
sql
)
result
=
cursor
.
fetchall
()
db
.
close
()
cids
=
[
str
(
i
[
0
])
for
i
in
result
]
cids
=
[
i
[
0
]
for
i
in
result
]
if
len
(
cids
)
!=
0
:
r
=
redis
.
Redis
(
host
=
"172.16.40.135"
,
port
=
5379
,
password
=
""
)
r
=
redis
.
Redis
(
host
=
"172.16.40.135"
,
port
=
5379
,
password
=
""
,
db
=
2
)
key
=
str
(
device_id
)
+
"_dislike_diary"
if
r
.
exists
(
key
):
value
=
eval
(
r
.
get
(
key
))
.
split
(
","
)
value
=
json
.
loads
(
r
.
get
(
key
)
.
decode
(
'utf-8'
)
)
value
.
extend
(
cids
)
value
=
","
.
join
([
str
(
i
)
for
i
in
set
(
value
)])
cids
=
json
.
dumps
(
value
)
r
.
set
(
key
,
cids
)
print
(
"cunz"
)
print
(
"cunz
a
"
)
else
:
r
.
set
(
key
,
json
.
dumps
(
","
.
join
(
cids
)
))
r
.
set
(
key
,
json
.
dumps
(
cids
))
r
.
expire
(
key
,
7
*
24
*
60
*
60
)
print
(
"bucunza"
)
return
"diary good"
except
Exception
as
e
:
...
...
@@ -237,8 +238,8 @@ def diary_write(device_id,cid):
# ssc.start()
# ssc.awaitTermination()
answer_write
(
"hello"
,
656482
)
answer_write
(
"hello"
,
"656482
"
)
diary_write
(
"hello"
,
16951169
)
diary_write
(
"hello"
,
"16283654
"
)
This diff is collapsed.
Click to expand it.
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