浏览代码

Merge branch '2024-10-14-luojunhui-new-content-bug-fix' of Server/title_with_video into 2024-09-23newDbTasks

luojunhui 6 月之前
父节点
当前提交
feb909905b
共有 1 个文件被更改,包括 12 次插入2 次删除
  1. 12 2
      tasks/newContentIdTask.py

+ 12 - 2
tasks/newContentIdTask.py

@@ -182,9 +182,12 @@ class NewContentIdTask(object):
 
     async def judge_whether_same_content_id_is_processing(self, content_id):
         """
-        同一个 content_id只需要处理一次
+        同一个 content_id 只需要处理一次
         :param content_id:
         :return:
+        success: 4
+        init: 0
+        fail: 99
         """
         select_sql = f"""
                    SELECT distinct content_status
@@ -195,7 +198,14 @@ class NewContentIdTask(object):
         if result:
             for item in result:
                 content_status = item[0]
-                if content_status not in {self.TASK_INIT_STATUS, self.TASK_PUBLISHED_STATUS} :
+                # if content_status not in {self.TASK_INIT_STATUS, self.TASK_PUBLISHED_STATUS} :
+                if content_status in {
+                    self.TASK_KIMI_FINISHED_STATUS,
+                    self.TASK_SPIDER_FINISHED_STATUS,
+                    self.TASK_ETL_FINISHED_STATUS,
+                    self.TASK_PROCESSING_STATUS,
+                    self.TASK_PUBLISHED_STATUS
+                }:
                     return True
             return False
         else: