Commit 5ffd4a92 authored by 高雅喆's avatar 高雅喆

日记灰度实验

parent 4abb0c80
......@@ -31,7 +31,6 @@ def search_diary_by_match_phrase(tag_names, city_tag_id, version):
]
if version:
sort_list += [
{'is_low_quality': {'order': 'asc'}},
{'has_video_cover': {'order': 'asc'}},
{'offline_score': {'order': 'desc'}},
{"good_click": {"order": "desc"}},
......@@ -173,7 +172,7 @@ if __name__ == "__main__":
light_clinic_beauty_qa_queue_key = "coldstart:light:clinic:beauty:qa:queue"
light_clinic_beauty_qa_queue_grey_key = "coldstart:light:clinic:beauty:qa:queue:grey"
light_clinic_beauty_diary_queue_key = "coldstart:light:clinic:beauty:diary:queue"
light_clinic_beauty_diary_queue_key2 = "coldstart:light:clinic:beauty:diary:queue:offline:score:v1"
light_clinic_beauty_diary_queue_grey_key = "coldstart:light:clinic:beauty:diary:queue:grey"
card_types = ['topic', 'qa'] # 日记有400多个城市,且是hmset,因此不用重置
# word_refers = ['coldstart:hot:search:word', 'coldstart:light:clinic:beauty']
word_refers = ['coldstart:light:clinic:beauty']
......@@ -236,5 +235,5 @@ if __name__ == "__main__":
for city_tag_id in all_city_tag_id:
diary_queue = search_diary_by_match_phrase(light_clinic_beauty, city_tag_id, version=1)
light_clinic_beauty_diary_queue.update({city_tag_id: json.dumps(diary_queue)})
redis_client.hmset(light_clinic_beauty_diary_queue_key2, light_clinic_beauty_diary_queue)
redis_client.hmset(light_clinic_beauty_diary_queue_grey_key, light_clinic_beauty_diary_queue)
print("轻医美词更新的灰度日记队列长度:%s" % str(len(diary_queue)))
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