Commit 232519b3 authored by 赵威's avatar 赵威

update tags limit

parent 79674b06
......@@ -39,10 +39,11 @@ def get_user_portrait_tag3_from_redis(device_id, limit_score=0, tags_num=5):
}
return {}
def get_user_portrait_tag3_business_tags(device_id, limit_score=0, tags_num=5):
portrait_key = get_user_portrait_tag3_redis_key(device_id)
if redis_client2.exists(portrait_key):
user_portrait = json.loads(redis_client2.get(portrait_key))
business_tags = items_gt_score(user_portrait.get("business_tags", {}))
business_tags = items_gt_score(user_portrait.get("business_tags", {}), limit_score=limit_score, tags_num=tags_num)
return business_tags
return []
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