Explorar el Código

2024-07-01
标题相似度-测试服务

罗俊辉 hace 9 meses
padre
commit
a8d3c3656a

+ 2 - 1
applications/deal/__init__.py

@@ -4,4 +4,5 @@
 from .search_deal import SearchDeal
 from .re_search_deal import ReSearchDeal
 from .process_deal import ProcessDeal
-from .search_deal_v2 import SearchDeal2
+from .search_deal_v2 import SearchDeal2
+from .get_done_content_deal import ProcessDeal2

+ 3 - 1
applications/deal/get_done_content_deal.py

@@ -6,6 +6,8 @@ import asyncio
 from applications.static.config import db_article
 from applications.schedule import search_videos
 from applications.functions.log import logging
+from applications.static.config import mysql_coroutines
+
 
 
 class ProcessDeal2(object):
@@ -30,7 +32,7 @@ class ProcessDeal2(object):
             WHERE content_status = 0 and process_times <= 5
             ORDER BY request_time_stamp
             ASC
-            LIMIT 40;
+            LIMIT {mysql_coroutines};
         """
         task_list = await self.mysql_client.async_select(sql=select_sql)
         task_obj_list = [

+ 2 - 1
applications/deal/process_deal.py

@@ -6,6 +6,7 @@ import asyncio
 from applications.static.config import db_article
 from applications.schedule import search_videos
 from applications.functions.log import logging
+from applications.static.config import spider_coroutines
 
 
 class ProcessDeal(object):
@@ -30,7 +31,7 @@ class ProcessDeal(object):
             WHERE content_status = 0 and process_times <= 5
             ORDER BY request_time_stamp
             ASC
-            LIMIT 6;
+            LIMIT {spider_coroutines};
         """
         content_ids = await self.mysql_client.async_select(select_sql1)
         cil = []