Commit 7fb7557b authored by 段英荣's avatar 段英荣

modify

parent 3cb6e0e7
......@@ -20,7 +20,7 @@ class PickUtils(object):
valid_seconds = int((end_time - now).seconds)
logging.info("duan add,have_read_celebrity_list:%s" % str(have_read_celebrity_list))
#logging.info("duan add,have_read_celebrity_list:%s" % str(have_read_celebrity_list))
redis_cli.setex(redis_key,valid_seconds,json.dumps(have_read_celebrity_list))
return True
......
......@@ -102,9 +102,8 @@ def pick_topic(user_id,pick_id,offset=0,size=10):
recommend_pick_topic_list = [item["_source"]["id"] for item in result_dict["hits"]]
if len(recommend_pick_topic_list) > 0:
logging.info("duan add,[:%s,%s]" % (str(have_read_pick_topic_ids),str(recommend_pick_topic_list)))
PickUtils.refresh_redis_data(have_read_celebrity_list=have_read_pick_topic_ids.extend(recommend_pick_topic_list),
total_read_topic_ids = have_read_pick_topic_ids + recommend_pick_topic_list
PickUtils.refresh_redis_data(have_read_celebrity_list=total_read_topic_ids,
redis_cli=redis_client,redis_key=redis_key)
return {"recommend_pick_topic_ids": recommend_pick_topic_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