|
@@ -9,7 +9,6 @@ from applications.config import Config
|
|
from applications.log import logging
|
|
from applications.log import logging
|
|
from applications.functions.pqFunctions import publish_to_pq, get_pq_video_detail
|
|
from applications.functions.pqFunctions import publish_to_pq, get_pq_video_detail
|
|
from applications.functions.common import shuffle_list
|
|
from applications.functions.common import shuffle_list
|
|
-from applications.match_algorithm.rank import get_title_oss_fission_list
|
|
|
|
|
|
|
|
|
|
|
|
class historyContentIdTask(object):
|
|
class historyContentIdTask(object):
|
|
@@ -73,7 +72,7 @@ class historyContentIdTask(object):
|
|
)
|
|
)
|
|
return task_obj_list
|
|
return task_obj_list
|
|
|
|
|
|
- async def get_video_list(self, content_id) -> list[dict]:
|
|
|
|
|
|
+ async def get_video_list(self, content_id):
|
|
"""
|
|
"""
|
|
content_id
|
|
content_id
|
|
:return:
|
|
:return:
|
|
@@ -138,10 +137,9 @@ class historyContentIdTask(object):
|
|
)
|
|
)
|
|
return row_counts
|
|
return row_counts
|
|
|
|
|
|
- async def publish_videos_to_pq(self, trace_id, flow_pool_level, kimi_title, gh_id, download_videos, process_times, content_id):
|
|
|
|
|
|
+ async def publish_videos_to_pq(self, trace_id, flow_pool_level, kimi_title, gh_id, download_videos, process_times):
|
|
"""
|
|
"""
|
|
发布至 pq
|
|
发布至 pq
|
|
- :param content_id:
|
|
|
|
:param process_times:
|
|
:param process_times:
|
|
:param trace_id:
|
|
:param trace_id:
|
|
:param download_videos: 已下载的视频---> list [{}, {}, {}.... ]
|
|
:param download_videos: 已下载的视频---> list [{}, {}, {}.... ]
|
|
@@ -163,35 +161,8 @@ class historyContentIdTask(object):
|
|
case "autoArticlePoolLevel2":
|
|
case "autoArticlePoolLevel2":
|
|
video_list = []
|
|
video_list = []
|
|
case "autoArticlePoolLevel1":
|
|
case "autoArticlePoolLevel1":
|
|
- # 头条内容,使用重排后结果
|
|
|
|
- fission_resort_list = await get_title_oss_fission_list(
|
|
|
|
- db_client=self.mysql_client,
|
|
|
|
- config=self.config,
|
|
|
|
- content_id=content_id
|
|
|
|
- )
|
|
|
|
- if fission_resort_list:
|
|
|
|
- total_video_list = fission_resort_list + download_videos
|
|
|
|
- logging(
|
|
|
|
- code=1106,
|
|
|
|
- info="查找裂变信息成功",
|
|
|
|
- trace_id=trace_id,
|
|
|
|
- data={
|
|
|
|
- "ori_list": download_videos[:3],
|
|
|
|
- "fission_list": fission_resort_list
|
|
|
|
- }
|
|
|
|
- )
|
|
|
|
- video_list = total_video_list[:3]
|
|
|
|
- else:
|
|
|
|
- # 未找到裂变信息,采用原来的顺序
|
|
|
|
- logging(
|
|
|
|
- code=1107,
|
|
|
|
- info="查找裂变信息失败",
|
|
|
|
- trace_id=trace_id,
|
|
|
|
- data={
|
|
|
|
- "ori_list": download_videos[:3]
|
|
|
|
- }
|
|
|
|
- )
|
|
|
|
- video_list = download_videos[:3]
|
|
|
|
|
|
+ # 头条,先不做
|
|
|
|
+ video_list = download_videos[:3]
|
|
case _:
|
|
case _:
|
|
print("未传流量池信息")
|
|
print("未传流量池信息")
|
|
video_list = download_videos[:3]
|
|
video_list = download_videos[:3]
|
|
@@ -329,8 +300,7 @@ class historyContentIdTask(object):
|
|
gh_id=gh_id,
|
|
gh_id=gh_id,
|
|
trace_id=trace_id,
|
|
trace_id=trace_id,
|
|
download_videos=download_videos,
|
|
download_videos=download_videos,
|
|
- process_times=process_times,
|
|
|
|
- content_id=content_id
|
|
|
|
|
|
+ process_times=process_times
|
|
)
|
|
)
|
|
except Exception as e:
|
|
except Exception as e:
|
|
logging(
|
|
logging(
|