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
9bdde766
Commit
9bdde766
authored
5 years ago
by
张彦钊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change test file
parent
de829a00
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
8 deletions
+5
-8
monitor.py
monitor.py
+5
-8
No files found.
monitor.py
View file @
9bdde766
...
@@ -77,21 +77,21 @@ def tractate_write(device_id, cid):
...
@@ -77,21 +77,21 @@ def tractate_write(device_id, cid):
cursor
.
execute
(
sql
)
cursor
.
execute
(
sql
)
result
=
cursor
.
fetchall
()
result
=
cursor
.
fetchall
()
db
.
close
()
db
.
close
()
cids
=
[
str
(
i
[
0
])
for
i
in
result
]
cids
=
[
i
[
0
]
for
i
in
result
]
if
len
(
cids
)
!=
0
:
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
=
""
)
key
=
str
(
device_id
)
+
"_dislike_tractate"
key
=
str
(
device_id
)
+
"_dislike_tractate"
if
r
.
exists
(
key
):
if
r
.
exists
(
key
):
value
=
eval
(
r
.
get
(
key
))
.
split
(
","
)
value
=
json
.
loads
(
r
.
get
(
key
)
.
decode
(
'utf-8'
)
)
value
.
extend
(
cids
)
value
.
extend
(
cids
)
value
=
","
.
join
([
str
(
i
)
for
i
in
set
(
value
)]
)
value
=
json
.
loads
(
list
(
set
(
value
))
)
cids
=
json
.
dumps
(
value
)
cids
=
json
.
dumps
(
value
)
r
.
set
(
key
,
cids
)
r
.
set
(
key
,
cids
)
print
(
"cunza"
)
print
(
"cunza"
)
else
:
else
:
r
.
set
(
key
,
json
.
dumps
(
","
.
join
(
cids
)
))
r
.
set
(
key
,
json
.
dumps
(
cids
))
r
.
expire
(
key
,
7
*
24
*
60
*
60
)
r
.
expire
(
key
,
7
*
24
*
60
*
60
)
...
@@ -239,10 +239,7 @@ def diary_write(device_id,cid):
...
@@ -239,10 +239,7 @@ def diary_write(device_id,cid):
# ssc.start()
# ssc.start()
# ssc.awaitTermination()
# ssc.awaitTermination()
# print(tractate_write("hello","10078"))
print
(
tractate_write
(
"hello"
,
"10078"
))
print
(
question_write
(
"hello"
,
209285
))
print
(
question_write
(
"hello"
,
"180103"
))
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