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
6a80bc1f
Commit
6a80bc1f
authored
Aug 22, 2019
by
张彦钊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change test fil
parent
d08bb0e2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
ctr-56.py
ctr-56.py
+7
-4
monitor.py
monitor.py
+0
-2
No files found.
ctr-56.py
View file @
6a80bc1f
...
...
@@ -5,12 +5,15 @@ import json
if
__name__
==
"__main__"
:
device_id
=
"869414033653380"
device_id
=
"D17A3770-1CC7-4AFB-A9EA-6E667EE051FF"
search_qa_recommend_key
=
"TS:search_recommend_answer_queue:device_id:"
+
str
(
device_id
)
r
=
redis
.
StrictRedis
.
from_url
(
"redis://redis.paas-test.env:6379/1"
)
cids
=
list
(
range
(
529405
,
529408
))
cids
=
[
str
(
i
)
for
i
in
cids
]
value
=
json
.
dumps
(
cids
)
r
.
hset
(
search_qa_recommend_key
,
'answer_queue'
,
value
)
search_topic_recommend_key
=
"TS:search_recommend_tractate_queue:device_id:"
+
str
(
device_id
)
value
=
json
.
dumps
([
1
,
2
,
3
])
r
.
hset
(
search_topic_recommend_key
,
'tractate_queue'
,
value
)
print
(
1
)
...
...
monitor.py
View file @
6a80bc1f
...
...
@@ -115,10 +115,8 @@ def question_write(device_id,cid):
"where a.is_online = 1 and c.tag_type = '3' and c.id = {}"
.
format
(
tags
)
cursor
.
execute
(
sql
)
result
=
cursor
.
fetchall
()
print
(
result
)
db
.
close
()
if
len
(
result
)
>
0
:
print
(
"have data"
)
cids
=
[
i
[
0
]
for
i
in
result
]
r
=
redis
.
Redis
(
host
=
"172.16.40.135"
,
port
=
5379
,
password
=
""
,
db
=
2
)
...
...
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