|
@@ -19,7 +19,7 @@ class ConsumptionRecommend(object):
|
|
|
@classmethod
|
|
|
async def run(cls):
|
|
|
logger.info(f"[处理] 开始获取redis数据")
|
|
|
- task = await RedisHelper().get_client().rpop(name = 'task:video_ai_pq')
|
|
|
+ task = RedisHelper().get_client().rpop(name = 'task:video_ai_pq')
|
|
|
if not task:
|
|
|
logger.info('[处理] 无待执行的扫描任务')
|
|
|
return
|
|
@@ -32,11 +32,12 @@ class ConsumptionRecommend(object):
|
|
|
return
|
|
|
logger.info(f"[处理] 获取原视频OSS地址,视频链接:{video_path}")
|
|
|
video_url = f"http://rescdn.yishihui.com/{video_path}"
|
|
|
- logger.info(f"[处理] 开始提取口播文案")
|
|
|
+ logger.info(f"[处理] 开始分析视频")
|
|
|
api_key = os.getenv("GEMINI_API_KEY")
|
|
|
+ # api_key = 'AIzaSyA637WjFSjVEKLHt09wbVdB01gwzZKM0Rg'
|
|
|
logger.info(f"[处理] 使用的API_KEY:{api_key}")
|
|
|
text = GoogleAI.run(api_key, video_url)
|
|
|
- AliyunLogger.logging(str(video_id), task['title'], task['video_path'], "", task['type'], task['partition'], text)
|
|
|
+ AliyunLogger.logging(str(video_id), task['title'], task['video_path'], "", task['type'], task['partition'], str(text))
|
|
|
logger.info(f"[处理] 写入日志成功")
|
|
|
|
|
|
|