|
@@ -157,7 +157,7 @@ class UpdatePublishedArticlesMinigramDetail(object):
|
|
|
:return:
|
|
|
"""
|
|
|
insert_sql = f"""
|
|
|
- INSERT INTO {DETAIL_TABLE}
|
|
|
+ INSERT IGNORE INTO {DETAIL_TABLE}
|
|
|
(wx_sn, mini_title, mini_name, cover_url, video_index, root_source_id, video_id, publish_dt, recall_dt)
|
|
|
values
|
|
|
(%s, %s, %s, %s, %s, %s, %s, %s, %s);
|
|
@@ -234,25 +234,6 @@ class UpdatePublishedArticlesMinigramDetail(object):
|
|
|
else:
|
|
|
return article_info
|
|
|
|
|
|
- # # check whether root_source_id_list is null
|
|
|
- # if root_source_id_list:
|
|
|
- # root_source_id_list = json.loads(article_info['root_source_id_list'])
|
|
|
- #
|
|
|
- # # check whether root_source_id is empty, if not, try to get
|
|
|
- # if not root_source_id_list:
|
|
|
- # root_source_id_response = check_root_source_id_list(url)
|
|
|
- # if root_source_id_response:
|
|
|
- # root_source_id_list = get_root_source_id_list(root_source_id_response)
|
|
|
- # else:
|
|
|
- # return
|
|
|
- #
|
|
|
- # for root_source_id in root_source_id_list:
|
|
|
- #
|
|
|
- # self.insert_each_root_source_id(root_source_id, article_info)
|
|
|
- #
|
|
|
- # else:
|
|
|
- # print('todo: root_source_id_list is None')
|
|
|
-
|
|
|
def get_root_source_id_for_three_days(self, biz_date: str) -> List[Dict]:
|
|
|
"""
|
|
|
获取publish_dt在 biz_date前三天的root_source_id
|
|
@@ -402,14 +383,6 @@ class UpdatePublishedArticlesMinigramDetail(object):
|
|
|
}
|
|
|
)
|
|
|
|
|
|
- if fail_count:
|
|
|
- bot(
|
|
|
- title="{} fail because of lam db error".format(TASK_NAME),
|
|
|
- detail={
|
|
|
- "fail_count": fail_count
|
|
|
- }
|
|
|
- )
|
|
|
-
|
|
|
|
|
|
|
|
|
|