1
This commit is contained in:
parent
00dbab723d
commit
6a95fa1365
@ -178,7 +178,6 @@ def _fullUpdateRank(rushtime):
|
||||
lambda : _fullUpdateRank(rushtime))
|
||||
f7.app.createAsyncTask(done_callback, fullUpdateRank, ())
|
||||
|
||||
|
||||
#每5分钟读取mysql里发生改变过的数据更新排行榜
|
||||
def incrementUpdateRank():
|
||||
mysql_conf = json.loads(open(CONFIG_DIR + '/rankserver.mysql.cluster.json', 'r').read())
|
||||
|
@ -15,7 +15,7 @@ import redis
|
||||
import os
|
||||
|
||||
if f7.isOnlineEnv():
|
||||
import game2004_rankserver as app
|
||||
import game2005_rankserver as app
|
||||
else:
|
||||
import app
|
||||
|
||||
@ -29,9 +29,9 @@ def _clearRank_cmd(debug_info):
|
||||
password = conf['passwd'],
|
||||
charset = 'utf8'
|
||||
)
|
||||
kill_keys = f7.scanRedisKey(r, "game2004api:kill_rank_*")
|
||||
win_keys = f7.scanRedisKey(r, "game2004api:win_rank_*")
|
||||
integral_keys = f7.scanRedisKey(r, "game2004api:integral_rank_*")
|
||||
kill_keys = f7.scanRedisKey(r, "game2005api:kill_rank_*")
|
||||
win_keys = f7.scanRedisKey(r, "game2005api:win_rank_*")
|
||||
integral_keys = f7.scanRedisKey(r, "game2005api:integral_rank_*")
|
||||
for key in kill_keys :
|
||||
r.delete(key)
|
||||
for key in win_keys :
|
||||
@ -67,7 +67,7 @@ if __name__ == "__main__":
|
||||
pass
|
||||
else:
|
||||
q7.xPrint('pid:' + str(os.getpid()))
|
||||
f7.app.init('/data/logs/game2004_rankserver_cmd/logs')
|
||||
f7.udplog.info('game2004_rankserver_cmd start pid:' + str(os.getpid()))
|
||||
f7.app.init('/data/logs/game2005_rankserver_cmd/logs')
|
||||
f7.udplog.info('game2005_rankserver_cmd start pid:' + str(os.getpid()))
|
||||
processCmdLine(sys.argv[1])
|
||||
f7.app.start()
|
||||
|
Loading…
x
Reference in New Issue
Block a user