|
@@ -46,7 +46,7 @@ class ArticleSummaryTask(object):
|
|
|
select_sql = f"""
|
|
|
select t1.video_text, t2.audit_video_id
|
|
|
from video_content_understanding t1 join publish_single_video_source t2 on t1.pq_vid = t2.audit_video_id
|
|
|
- where t1.status = 2 and t2.bad_status = 0 and t2.extract_status = 1;
|
|
|
+ where t1.status = 2 and t2.bad_status = 0 and t2.extract_status = 0;
|
|
|
"""
|
|
|
task_list = self.db_client.fetch(select_sql, cursor_type=DictCursor)
|
|
|
return task_list
|
|
@@ -62,11 +62,11 @@ class ArticleSummaryTask(object):
|
|
|
audit_video_id = task["audit_video_id"]
|
|
|
# 开始处理,将extract_status更新为101
|
|
|
update_sql = f"""
|
|
|
- update publish_single_video_source set extract_status = %s where audit_video_id = %s
|
|
|
+ update publish_single_video_source set extract_status = %s where audit_video_id = %s and extract_status = %s
|
|
|
"""
|
|
|
affected_rows = self.db_client.save(
|
|
|
query=update_sql,
|
|
|
- params=(101, audit_video_id)
|
|
|
+ params=(101, audit_video_id, 0)
|
|
|
)
|
|
|
if not affected_rows:
|
|
|
return
|