Commit c7437c80 authored by 高雅喆's avatar 高雅喆

update

parent d415c567
......@@ -164,15 +164,18 @@ if __name__ == "__main__":
hot_search_word_topic_queue = search_topic_by_match_phrase(hot_search_word)
redis_client.rpush(hot_search_word_topic_queue_key, *hot_search_word_topic_queue)
# redis_client.lrange(hot_search_word_topic_queue_key, 0, 3)
print("热搜词更新的帖子队列长度:%s" % str(len(hot_search_word_topic_queue)))
hot_search_word_qa_queue = search_qa_by_match_phrase(hot_search_word)
redis_client.rpush(hot_search_word_qa_queue_key, *hot_search_word_qa_queue)
print("热搜词更新的问答队列长度:%s" % str(len(hot_search_word_qa_queue)))
# redis_client.lrange(hot_search_word_qa_queue_key, 0, 3)
for city_tag_id in all_city_tag_id:
diary_queue = search_diary_by_match_phrase(hot_search_word, city_tag_id)
hot_search_word_diary_queue.update({city_tag_id: diary_queue})
redis_client.hmset(hot_search_word_diary_queue_key, hot_search_word_diary_queue)
print("热搜词更新的日记队列长度:%s" % str(len(diary_queue)))
# 轻医美的候选队列
light_clinic_beauty_key = "user:service_coldstart_tags3"
......@@ -183,11 +186,14 @@ if __name__ == "__main__":
# 队列存储
light_clinic_beauty_topic_queue = search_topic_by_match_phrase(light_clinic_beauty)
redis_client.rpush(light_clinic_beauty_topic_queue_key, *light_clinic_beauty_topic_queue)
print("轻医美词更新的帖子队列长度:%s" % str(len(light_clinic_beauty_topic_queue)))
light_clinic_beauty_qa_queue = search_qa_by_match_phrase(light_clinic_beauty)
redis_client.rpush(light_clinic_beauty_qa_queue_key, *light_clinic_beauty_qa_queue)
print("轻医美词更新的问答队列长度:%s" % str(len(light_clinic_beauty_qa_queue)))
for city_tag_id in all_city_tag_id:
diary_queue = search_diary_by_match_phrase(light_clinic_beauty, city_tag_id)
light_clinic_beauty_diary_queue.update({city_tag_id: diary_queue})
redis_client.hmset(light_clinic_beauty_diary_queue_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