浏览代码

优先抓未抓过的账号

luojunhui 6 月之前
父节点
当前提交
904fdaefad
共有 1 个文件被更改,包括 2 次插入1 次删除
  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 gh_id, account_name, latest_crawler_timestamp
             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)
         return response