liqian hace 3 años
padre
commit
c3ed83afd0
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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)}')