Browse Source

排序规则修改

jihuaqiang 1 week ago
parent
commit
938d81ae09
1 changed files with 1 additions and 1 deletions
  1. 1 1
      scheduler/odps_fetch.py

+ 1 - 1
scheduler/odps_fetch.py

@@ -47,7 +47,7 @@ def fetch_priority_posts(limit: int = 10, offset: int = 0, dt: Optional[str] = N
         FROM {ODPS_TABLE}
         WHERE dt = '{target_dt}'
           AND level IN (0, 1, 2)
-        ORDER BY level ASC
+        ORDER BY count DESC, level ASC
         LIMIT {offset}, {limit}
     """
     logger.info("开始执行ODPS查询 dt={} limit={} offset={}", target_dt, limit, offset)