Browse Source

Merge branch '2024-11-08-luojunhui-add-flowpool-order' of Server/title_with_video into 2024-09-23newDbTasks

luojunhui 5 months ago
parent
commit
6102d38dd9
2 changed files with 2 additions and 1 deletions
  1. 1 1
      tasks/history_task.py
  2. 1 0
      tasks/newContentIdTask.py

+ 1 - 1
tasks/history_task.py

@@ -52,7 +52,7 @@ class historyContentIdTask(object):
                 group by content_id
             ) VID on ART.content_id = VID.content_id and VID.cnt >= 3
             WHERE ART.content_status = 0 and ART.process_times <= 3
-            ORDER BY request_timestamp
+            ORDER BY ART.flow_pool_level, ART.request_timestamp
             LIMIT {self.history_coroutines};
         """
         tasks = await self.mysql_client.async_select(sql=select_sql1)

+ 1 - 0
tasks/newContentIdTask.py

@@ -97,6 +97,7 @@ class NewContentIdTask(object):
             WHERE
                     content_status = {self.TASK_INIT_STATUS}
                 and process_times <= {self.TASK_MAX_PROCESS_TIMES}
+            ORDER BY flow_pool_level, request_timestamp
             LIMIT {self.spider_coroutines};
         """
         tasks = await self.mysql_client.async_select(select_sql)