Commit 72a7bcfa authored by 段英荣's avatar 段英荣

Merge branch 'dev' into 'master'

modify

See merge request !17
parents 6847dbff a0695fe5
...@@ -27,7 +27,7 @@ def home_recommend(session_id="",user_id=-1,offset=0,size=10): ...@@ -27,7 +27,7 @@ def home_recommend(session_id="",user_id=-1,offset=0,size=10):
session_id = "" session_id = ""
redis_key = "physical:home_recommend" + ":user_id:" + str(user_id) + ":session_id:" + session_id redis_key = "physical:home_recommend" + ":user_id:" + str(user_id) + ":session_id:" + session_id
redis_val_dict = redis_client.hgetall(redis_key) redis_val_dict = redis_client.hgetall(redis_key)
last_offset_num = redis_val_dict["last_offset_num"] if "last_offset_num" in redis_val_dict else -1 last_offset_num = redis_val_dict["last_offset_num"] if "last_offset_num" in redis_val_dict else -1000
recommend_topic_ids = [] recommend_topic_ids = []
...@@ -91,7 +91,7 @@ def home_query(session_id="",user_id=-1,query="",offset=0,size=10): ...@@ -91,7 +91,7 @@ def home_query(session_id="",user_id=-1,query="",offset=0,size=10):
session_id = "" session_id = ""
redis_key = "physical:home_query" + ":user_id:" + str(user_id) + ":session_id:" + session_id redis_key = "physical:home_query" + ":user_id:" + str(user_id) + ":session_id:" + session_id
redis_val_dict = redis_client.hgetall(redis_key) redis_val_dict = redis_client.hgetall(redis_key)
last_offset_num = redis_val_dict["last_offset_num"] if "last_offset_num" in redis_val_dict else -1 last_offset_num = redis_val_dict["last_offset_num"] if "last_offset_num" in redis_val_dict else -1000
recommend_topic_ids = [] recommend_topic_ids = []
......
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