| 
														
															@@ -35,7 +35,7 @@ class MatchArticlesTask(object): 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         执行定时任务,把库里面的视频转文本 
														 | 
														
														 | 
														
															         执行定时任务,把库里面的视频转文本 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         :return: 
														 | 
														
														 | 
														
															         :return: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         """ 
														 | 
														
														 | 
														
															         """ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        select_sql = f"""SELECT video_id FROM {db_config} WHERE status_code = 0 ORDER BY id ASC limit 10;""" 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        select_sql = f"""SELECT video_id FROM {db_config} WHERE status_code = 0 ORDER BY id ASC limit 1;""" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         video_list = await self.mysql_client.select(select_sql) 
														 | 
														
														 | 
														
															         video_list = await self.mysql_client.select(select_sql) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															         async def whisper_and_update(video_id, mysql_client): 
														 | 
														
														 | 
														
															         async def whisper_and_update(video_id, mysql_client): 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -65,7 +65,7 @@ class MatchArticlesTask(object): 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         获取task的材料 
														 | 
														
														 | 
														
															         获取task的材料 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         :return: 
														 | 
														
														 | 
														
															         :return: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         """ 
														 | 
														
														 | 
														
															         """ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        select_sql = f"""SELECT task_id, video_title, video_text FROM {db_config} WHERE status_code = 1 ORDER BY id ASC limit 10;""" 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        select_sql = f"""SELECT task_id, video_title, video_text FROM {db_config} WHERE status_code = 1 ORDER BY id ASC limit 1;""" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         task_list = await self.mysql_client.select(select_sql) 
														 | 
														
														 | 
														
															         task_list = await self.mysql_client.select(select_sql) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															         async def find_material(task_tuple, mysql_client): 
														 | 
														
														 | 
														
															         async def find_material(task_tuple, mysql_client): 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -95,7 +95,7 @@ class MatchArticlesTask(object): 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         通过ai工具和材料来生成文章 
														 | 
														
														 | 
														
															         通过ai工具和材料来生成文章 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         :return: 
														 | 
														
														 | 
														
															         :return: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         """ 
														 | 
														
														 | 
														
															         """ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        select_sql = f"""SELECT task_id, video_title, materials FROM {db_config} WHERE status_code = 2 ORDER BY id ASC limit 10;""" 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        select_sql = f"""SELECT task_id, video_title, materials FROM {db_config} WHERE status_code = 2 ORDER BY id ASC limit 1;""" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         task_list = await self.mysql_client.select(sql=select_sql) 
														 | 
														
														 | 
														
															         task_list = await self.mysql_client.select(sql=select_sql) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															         async def ai_generate_text(task_tuple, mysql_client): 
														 | 
														
														 | 
														
															         async def ai_generate_text(task_tuple, mysql_client): 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -104,7 +104,7 @@ class MatchArticlesTask(object): 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             imgs = get_img_list(video_title) 
														 | 
														
														 | 
														
															             imgs = get_img_list(video_title) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             update_sql = f""" 
														 | 
														
														 | 
														
															             update_sql = f""" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             UPDATE {db_config} 
														 | 
														
														 | 
														
															             UPDATE {db_config} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            SET ai_text = '{ai_text}', ai_title = '{ai_title}', img_list = '{json.dumps(imgs, ensure_ascii=False)}',status_code = 3 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            SET ai_text = '{ai_text}', ai_title = '{ai_title}', cover = '{imgs[0]}',img_list = '{json.dumps(imgs, ensure_ascii=False)}',status_code = 3 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             WHERE task_id = '{task_id}'; 
														 | 
														
														 | 
														
															             WHERE task_id = '{task_id}'; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             """ 
														 | 
														
														 | 
														
															             """ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             print(update_sql) 
														 | 
														
														 | 
														
															             print(update_sql) 
														 |