This commit is contained in:
wangwei01 2019-06-13 21:24:48 +08:00
parent f21d04de3c
commit 4dec805ed7

View File

@ -77,7 +77,7 @@ def readMysqlData(rushtime):
alive_time = safeDiv(row[4], row[7])
harm = safeDiv(row[5], row[7])
win_times = safeDiv(row[6], row[7])
array.append((row[0], row[1], row[2], kill, alive_time, harm, win_times, row[6]))
array.append((row[0], row[1].decode('utf-8'), row[2], kill, alive_time, harm, win_times, row[6]))
r = getRedis()
array.sort(key=take_kills, reverse=True)
@ -126,7 +126,7 @@ if __name__ == "__main__":
app = make_app()
app.listen(conf['listen_port'])
conf['rushtime'] = 300
conf['rushtime'] = 3
tornado.ioloop.IOLoop.current().call_later(conf['rushtime'],
lambda : readMysqlData(conf['rushtime'])