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
62d71c5b
Commit
62d71c5b
authored
5 years ago
by
张彦钊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change test file
parent
0c1bc073
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
monitor.py
monitor.py
+6
-6
No files found.
monitor.py
View file @
62d71c5b
...
...
@@ -117,21 +117,20 @@ def answer_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_answer"
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
(
"cunza"
)
else
:
r
.
set
(
key
,
json
.
dumps
(
","
.
join
(
cids
)
))
r
.
set
(
key
,
json
.
dumps
(
cids
))
r
.
expire
(
key
,
7
*
24
*
60
*
60
)
...
...
@@ -238,7 +237,8 @@ def diary_write(device_id,cid):
# ssc.start()
# ssc.awaitTermination()
print
(
tractate_write
(
"hello"
,
10078
))
answer_write
(
"hello"
,
656482
)
answer_write
(
"hello"
,
"656482"
)
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