Commit 0368762a authored by lixiaofang's avatar lixiaofang

highlight

parent 5f4ef7cd
...@@ -170,7 +170,6 @@ def get_home_recommend_topic_ids(user_id, device_id, tag_id, offset, size, query ...@@ -170,7 +170,6 @@ def get_home_recommend_topic_ids(user_id, device_id, tag_id, offset, size, query
linucb_user_id_list=recommend_topic_user_list, linucb_user_id_list=recommend_topic_user_list,
disable_collpase=disable_collpase) disable_collpase=disable_collpase)
logging.info("get rank_topic_id_list:%s" % rank_topic_id_list)
# if len(recommend_topic_list) == 6 and query is None: # if len(recommend_topic_list) == 6 and query is None:
# if (size < 11): # if (size < 11):
# topic_id_list.extend(rank_topic_id_list[0:3]) # topic_id_list.extend(rank_topic_id_list[0:3])
...@@ -184,7 +183,12 @@ def get_home_recommend_topic_ids(user_id, device_id, tag_id, offset, size, query ...@@ -184,7 +183,12 @@ def get_home_recommend_topic_ids(user_id, device_id, tag_id, offset, size, query
# topic_id_list.extend(recommend_topic_list[3:6]) # topic_id_list.extend(recommend_topic_list[3:6])
# else: # else:
# topic_id_list.extend(rank_topic_id_list) # topic_id_list.extend(rank_topic_id_list)
if query is None:
have_read_topic_id_list.extend(rank_topic_id_list) have_read_topic_id_list.extend(rank_topic_id_list)
else:
have_read_topic_id_list.extend(item["id"] for item in rank_topic_id_list)
if len(have_read_topic_id_list) > 30000: if len(have_read_topic_id_list) > 30000:
cut_len = len(have_read_topic_id_list) - 30000 cut_len = len(have_read_topic_id_list) - 30000
have_read_topic_id_list = have_read_topic_id_list[cut_len:] have_read_topic_id_list = have_read_topic_id_list[cut_len:]
......
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