浏览代码

490行--超过 3 条就结束下载

535 行-- get_video_list
修改为 get_downloaded_list
罗俊辉 7 月之前
父节点
当前提交
7f11675f53
共有 1 个文件被更改,包括 8 次插入1 次删除
  1. 8 1
      tasks/newContentIdTask.py

+ 8 - 1
tasks/newContentIdTask.py

@@ -487,6 +487,13 @@ class NewContentIdTask(object):
                         )
                     )
                     downloaded_count += 1
+                    if downloaded_count > 3:
+                        await self.update_content_status(
+                            ori_content_status=self.task_processing_status,
+                            trace_id=trace_id,
+                            new_content_status=etl_task_success_status
+                        )
+                        return True
                 except Exception as e:
                     update_sql = f"""
                     UPDATE {self.article_crawler_video_table}
@@ -532,7 +539,7 @@ class NewContentIdTask(object):
             new_content_status=self.task_processing_status
         )
         try:
-            download_videos = await self.get_video_list(content_id)
+            download_videos = await self.get_downloaded_videos(content_id)
             match flow_pool_level:
                 case "autoArticlePoolLevel4":
                     # 冷启层, 全量做