liqian 3 년 전
부모
커밋
c3ed83afd0
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      app_rank_h.py

+ 1 - 1
app_rank_h.py

@@ -79,7 +79,7 @@ def app_rank_op(now_date, now_h):
     # op_data = redis_helper.get_data_zset_with_index(key_name=op_key_name, start=0, end=-1, with_scores=True)
     op_data = get_op_data(now_date=now_date, project=config_.APP_OP_PROJECT, table=config_.APP_OP_TABLE)
     # 倒序排序
-    op_data.sort(key=lambda x: x['rank'], reverse=True)
+    op_data.sort(key=lambda x: int(x['rank']), reverse=True)
     op_video_ids = [int(item['videoid']) for item in op_data]
     log_.info(f'op video count = {len(op_video_ids)}')