소스 검색

Merge branch '2025-06-25-luojunhui-add-server-bot' of luojunhui/LongArticlesJob into master

luojunhui 2 주 전
부모
커밋
d798d409a7
1개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  1. 4 3
      tasks/data_tasks/fwh_data_recycle.py

+ 4 - 3
tasks/data_tasks/fwh_data_recycle.py

@@ -23,7 +23,7 @@ class FwhDataRecycle:
 
     PUBLISH_SUCCESS_STATUS = 2
 
-    STAT_PERIOD = 2 * 24 * 3600
+    STAT_PERIOD = 3 * 24 * 3600
 
     ARTICLE_ILLEGAL_CODE = 25012
 
@@ -247,10 +247,11 @@ class SaveFwhDataToDatabase(FwhDataRecycle):
             from long_articles_group_send_result
             where gh_id = %s and recycle_status = %s and create_time > %s;
         """
+        earliest_time = datetime.fromtimestamp(earliest_timestamp).strftime("%Y-%m-%d %H:%M:%S")
         return self.long_articles_client.fetch(
             fetch_query,
             DictCursor,
-            (gh_id, self.RECYCLE_SUCCESS_STATUS, earliest_timestamp),
+            (gh_id, self.RECYCLE_SUCCESS_STATUS, earliest_time),
         )
 
     def process_each_account_data(self, account_published_article_list):
@@ -403,4 +404,4 @@ class FwhDataExportTemp(FwhDataRecycle):
                 except Exception as e:
                     print(f"article {article['ContentUrl']} is not available, skip it")
         df = pd.DataFrame(L)
-        df.to_csv("temp2.csv", index=False)
+        df.to_csv("temp2.csv", index=False)