Ver Fonte

优先抓未抓过的账号

luojunhui há 3 meses atrás
pai
commit
904fdaefad
1 ficheiros alterados com 2 adições e 1 exclusões
  1. 2 1
      coldStartTasks/crawler/weixin_video_crawler.py

+ 2 - 1
coldStartTasks/crawler/weixin_video_crawler.py

@@ -87,7 +87,8 @@ class WeixinVideoCrawler(object):
         select_sql = f"""
         select_sql = f"""
             SELECT gh_id, account_name, latest_crawler_timestamp
             SELECT gh_id, account_name, latest_crawler_timestamp
             FROM weixin_account_for_videos
             FROM weixin_account_for_videos
-            WHERE status = {const.ACCOUNT_CRAWL_STATUS};
+            WHERE status = {const.ACCOUNT_CRAWL_STATUS}
+            ORDER BY latest_crawler_timestamp;
         """
         """
         response = self.db_client.select(select_sql, DictCursor)
         response = self.db_client.select(select_sql, DictCursor)
         return response
         return response