Commit 93354e84 authored by 段英荣's avatar 段英荣

modify

parent 9192ab55
......@@ -71,8 +71,10 @@ def get_home_recommend_topic_ids(user_id, device_id, tag_id, offset, size, query
if b"data" in recommend_topic_dict:
recommend_topic_id_list = json.loads(recommend_topic_dict[b"data"])
cursor = int(str(recommend_topic_dict[b"cursor"], encoding="utf-8"))
if len(recommend_topic_id_list) > (cursor+5):
recommend_topic_list = recommend_topic_id_list[cursor:cursor+5]
newcursor = cursor + 5
if len(recommend_topic_id_list) > newcursor:
recommend_topic_list = recommend_topic_id_list[cursor:newcursor]
redis_client.hset(topic_recommend_redis_key,"cursor",newcursor)
have_read_topic_id_list = list()
......
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