This commit is contained in:
aozhiwei 2021-12-17 19:37:19 +08:00
parent 00dbab723d
commit 6a95fa1365
2 changed files with 6 additions and 7 deletions

View File

@ -178,7 +178,6 @@ def _fullUpdateRank(rushtime):
lambda : _fullUpdateRank(rushtime)) lambda : _fullUpdateRank(rushtime))
f7.app.createAsyncTask(done_callback, fullUpdateRank, ()) f7.app.createAsyncTask(done_callback, fullUpdateRank, ())
#每5分钟读取mysql里发生改变过的数据更新排行榜 #每5分钟读取mysql里发生改变过的数据更新排行榜
def incrementUpdateRank(): def incrementUpdateRank():
mysql_conf = json.loads(open(CONFIG_DIR + '/rankserver.mysql.cluster.json', 'r').read()) mysql_conf = json.loads(open(CONFIG_DIR + '/rankserver.mysql.cluster.json', 'r').read())

View File

@ -15,7 +15,7 @@ import redis
import os import os
if f7.isOnlineEnv(): if f7.isOnlineEnv():
import game2004_rankserver as app import game2005_rankserver as app
else: else:
import app import app
@ -29,9 +29,9 @@ def _clearRank_cmd(debug_info):
password = conf['passwd'], password = conf['passwd'],
charset = 'utf8' charset = 'utf8'
) )
kill_keys = f7.scanRedisKey(r, "game2004api:kill_rank_*") kill_keys = f7.scanRedisKey(r, "game2005api:kill_rank_*")
win_keys = f7.scanRedisKey(r, "game2004api:win_rank_*") win_keys = f7.scanRedisKey(r, "game2005api:win_rank_*")
integral_keys = f7.scanRedisKey(r, "game2004api:integral_rank_*") integral_keys = f7.scanRedisKey(r, "game2005api:integral_rank_*")
for key in kill_keys : for key in kill_keys :
r.delete(key) r.delete(key)
for key in win_keys : for key in win_keys :
@ -67,7 +67,7 @@ if __name__ == "__main__":
pass pass
else: else:
q7.xPrint('pid:' + str(os.getpid())) q7.xPrint('pid:' + str(os.getpid()))
f7.app.init('/data/logs/game2004_rankserver_cmd/logs') f7.app.init('/data/logs/game2005_rankserver_cmd/logs')
f7.udplog.info('game2004_rankserver_cmd start pid:' + str(os.getpid())) f7.udplog.info('game2005_rankserver_cmd start pid:' + str(os.getpid()))
processCmdLine(sys.argv[1]) processCmdLine(sys.argv[1])
f7.app.start() f7.app.start()