Selaa lähdekoodia

Merge branch '2025-03-07-sph-crawler-improve' of luojunhui/LongArticlesJob into master

luojunhui 3 kuukautta sitten
vanhempi
commit
2054ccc78b
1 muutettua tiedostoa jossa 5 lisäystä ja 1 poistoa
  1. 5 1
      tasks/crawler_channel_account_videos.py

+ 5 - 1
tasks/crawler_channel_account_videos.py

@@ -53,7 +53,11 @@ class CrawlerChannelAccountVideos:
         """
         get channel account list from database
         """
-        sql = f"""select account_id, max_cursor from sph_account_for_videos where status = {const.CHANNEL_ACCOUNT_GOOD_STATUS};"""
+        sql = f"""
+            select account_id, max_cursor 
+            from sph_account_for_videos 
+            where status = {const.CHANNEL_ACCOUNT_GOOD_STATUS}
+            order by max_cursor;"""
         account_list = self.db_client.fetch(query=sql, cursor_type=DictCursor)
         return account_list