Просмотр исходного кода

兼容替换实验后video_id为0的情况

luojunhui 5 часов назад
Родитель
Сommit
95cbbd075a
1 измененных файлов с 3 добавлено и 2 удалено
  1. 3 2
      applications/tasks/monitor_tasks/get_off_videos.py

+ 3 - 2
applications/tasks/monitor_tasks/get_off_videos.py

@@ -42,7 +42,8 @@ class GetOffVideos(GetOffVideosConst):
     ):
         """get videos which need get off"""
         query = f"""
-            select video_id from {self.table} where video_status = %s and publish_time between %s and %s;
+            select video_id from {self.table} where video_status = %s and publish_time between %s and %s
+            and video_id > 1;
         """
         video_list = await self.db_client.async_fetch(
             query,
@@ -174,7 +175,7 @@ class CheckVideoAuditStatus(GetOffVideosConst):
     async def get_unchecked_video_list(self) -> Optional[List[int]]:
         """find unchecked videos"""
         query = f"""
-            select video_id from {self.table} where check_status = %s and video_status = %s limit 1000;
+            select video_id from {self.table} where check_status = %s and video_status = %s and video_id > 1 limit 1000;
         """
         video_id_list = await self.db_client.async_fetch(
             query, params=(self.CHECK_INIT_STATUS, self.VIDEO_AVAILABLE_STATUS)