This commit is contained in:
wangwei01 2019-07-26 18:30:38 +08:00
parent 515698ffab
commit 1c22969a07

View File

@ -67,7 +67,7 @@ def readMysqlData(rushtime):
r = getRedis()
array.sort(key=take_score, reverse=True)
score_rank = []
for score_index in range(50):
for score_index in range(min(50, len(array))):
score_rank.append(array[score_index])
r.set("game2002api: score_rank", json.dumps(score_rank))