Explorar o código

Merge branch '2025-01-21-bugfix' of luojunhui/LongArticlesJob into master

luojunhui hai 3 meses
pai
achega
646c10b65c
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      updatePublishedMsgDaily.py

+ 3 - 3
updatePublishedMsgDaily.py

@@ -422,12 +422,12 @@ def get_article_detail_job(db_client: DatabaseConnector):
     update_sql = f"""
         UPDATE {ARTICLE_TABLE} oav 
         JOIN (
-            SELECT appMsgId, MAX(publish_timestamp) AS publish_timestamp 
+            SELECT ghId, appMsgId, MAX(publish_timestamp) AS publish_timestamp 
             FROM {ARTICLE_TABLE} 
             WHERE publish_timestamp > %s 
-            GROUP BY appMsgId
+            GROUP BY ghId, appMsgId
             ) vv 
-            ON oav.appMsgId = vv.appMsgId
+            ON oav.appMsgId = vv.appMsgId AND oav.ghId = vv.ghId
         SET oav.publish_timestamp = vv.publish_timestamp
         WHERE oav.publish_timestamp <= %s;
     """