Преглед на файлове

将审核天数提高到7天

luojunhui преди 6 месеца
родител
ревизия
ab5c1a1b50
променени са 1 файла, в които са добавени 4 реда и са изтрити 2 реда
  1. 4 2
      updatePublishedMsgDaily.py

+ 4 - 2
updatePublishedMsgDaily.py

@@ -608,7 +608,7 @@ def monitor():
     now_time = int(time.time())
     monitor_start_timestamp = now_time - const.MONITOR_PERIOD
     select_sql = f"""
-        SELECT ghId, accountName, title, ContentUrl, wx_sn
+        SELECT ghId, accountName, title, ContentUrl, wx_sn, from_unixtime(publish_timestamp) AS publish_timestamp
         FROM {ARTICLE_TABLE}
         WHERE publish_timestamp >= {monitor_start_timestamp};
     """
@@ -619,6 +619,7 @@ def monitor():
         title = article[2]
         url = article[3]
         wx_sn = article[4]
+        publish_timestamp = article[5]
         try:
             response = spider.get_article_text(url, is_cache=False)
             response_code = response['code']
@@ -629,7 +630,8 @@ def monitor():
                         "ghId": gh_id,
                         "accountName": account_name,
                         "title": title,
-                        "wx_sn": str(wx_sn)
+                        "wx_sn": str(wx_sn),
+                        "publish_date": publish_timestamp
                     },
                     mention=False
                 )