Преглед на файлове

Merge branch '2024-12-16-add-bot-when-kimi-fails-improve' of Server/title_with_video into 2024-09-23newDbTasks

luojunhui преди 4 месеца
родител
ревизия
2999be3cd0
променени са 1 файла, в които са добавени 11 реда и са изтрити 2 реда
  1. 11 2
      tasks/new_contentId_task.py

+ 11 - 2
tasks/new_contentId_task.py

@@ -852,12 +852,21 @@ class NewContentIdTask(object):
                         NewContentIdTaskConst.TASK_INIT_STATUS
                         NewContentIdTaskConst.TASK_INIT_STATUS
                     )
                     )
                 )
                 )
+                # 查询出该content_id所对应的标题
+                select_sql = f"""
+                    SELECT article_title
+                    FROM {self.article_text_table}
+                    WHRER content_id = '{content_id}';
+                """
+                result = await self.mysql_client.async_select(select_sql)
                 bot(
                 bot(
                     title="KIMI 处理失败",
                     title="KIMI 处理失败",
                     detail={
                     detail={
                         "content_id": content_id,
                         "content_id": content_id,
-                        "affected_rows": affected_rows
-                    }
+                        "affected_rows": affected_rows,
+                        "article_title": result[0][0]
+                    },
+                    mention=False
                 )
                 )
 
 
     async def process_task(self, params):
     async def process_task(self, params):