|
|
@@ -4,6 +4,7 @@ from typing import List, Optional
|
|
|
|
|
|
from tqdm import tqdm
|
|
|
|
|
|
+from applications.api import AsyncApolloApi
|
|
|
from applications.api import change_video_audit_status
|
|
|
from applications.api import fetch_piaoquan_video_list_detail
|
|
|
from applications.api import feishu_robot
|
|
|
@@ -31,12 +32,19 @@ class GetOffVideosConst:
|
|
|
table = "get_off_videos"
|
|
|
|
|
|
|
|
|
-class GetOffVideos(GetOffVideosConst):
|
|
|
+class GetOffVideos(GetOffVideosConst, AsyncApolloApi):
|
|
|
def __init__(self, db_client, log_client, trace_id):
|
|
|
+ super().__init__()
|
|
|
self.db_client = db_client
|
|
|
self.log_client = log_client
|
|
|
self.trace_id = trace_id
|
|
|
|
|
|
+ async def get_no_need_get_off_videos() -> set:
|
|
|
+ """get video_ids which don't need to get off"""
|
|
|
+ # video_ids = await self.get_config_value(key="white_video_ids")
|
|
|
+ video_ids = [61719952]
|
|
|
+ return set(video_ids)
|
|
|
+
|
|
|
async def get_task_list(
|
|
|
self, earliest_timestamp_threshold: int, expire_timestamp_threshold: int
|
|
|
):
|
|
|
@@ -53,6 +61,10 @@ class GetOffVideos(GetOffVideosConst):
|
|
|
expire_timestamp_threshold,
|
|
|
),
|
|
|
)
|
|
|
+ no_need_get_off_videos = await self.get_no_need_get_off_videos()
|
|
|
+ video_list = [
|
|
|
+ video for video in video_list if video["video_id"] not in no_need_get_off_videos
|
|
|
+ ]
|
|
|
return video_list
|
|
|
|
|
|
async def update_video_status(self, video_id):
|