Commit 6a80bc1f authored by 张彦钊's avatar 张彦钊

change test fil

parent d08bb0e2
......@@ -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)
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment