Commit 675e49a2 authored by 段英荣's avatar 段英荣

modify

parent 7645ed61
...@@ -89,7 +89,7 @@ def home_query(session_id="",user_id=-1,query="",offset=0,size=10): ...@@ -89,7 +89,7 @@ def home_query(session_id="",user_id=-1,query="",offset=0,size=10):
user_id=-1 user_id=-1
if not isinstance(session_id,str): if not isinstance(session_id,str):
session_id = "" session_id = ""
redis_key = "physical:home_query" + ":user_id:" + str(user_id) + ":session_id:" + session_id + ":query:" + str(query).encode("utf-8") redis_key = "physical:home_query" + ":user_id:" + str(user_id) + ":session_id:" + session_id + ":query:" + str(query)
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 -1
......
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