1
This commit is contained in:
parent
461a6aa4ed
commit
481bb278dc
@ -37,6 +37,11 @@ def getRedisConf():
|
||||
redis_conf = json.loads(open(CONFIG_DIR + '/rankserver.redis.cluster.json', 'r').read())
|
||||
return redis_conf;
|
||||
|
||||
def checkchannel(channel):
|
||||
if channel == 6006:
|
||||
return false
|
||||
else:
|
||||
return true
|
||||
|
||||
def info(msg):
|
||||
print(str(datetime.datetime.now()) + '[INFO] ' + msg)
|
||||
@ -132,16 +137,19 @@ def fullUpdateRank():
|
||||
has_data = True
|
||||
#更新击杀榜
|
||||
channel = f7.getChannelByAccountId(row[0])
|
||||
if checkchannel(channel) == true:
|
||||
if channel not in kill_hash:
|
||||
kill_hash[channel] = []
|
||||
_refreshData(row, kill_hash[channel], take_kills)
|
||||
#更新胜场榜
|
||||
channel = f7.getChannelByAccountId(row[0])
|
||||
if checkchannel(channel) == true:
|
||||
if channel not in win_hash:
|
||||
win_hash[channel] = []
|
||||
_refreshData(row, win_hash[channel], take_game_times)
|
||||
#更新积分榜
|
||||
channel = f7.getChannelByAccountId(row[0])
|
||||
if checkchannel(channel) == true:
|
||||
if channel not in integral_hash:
|
||||
integral_hash[channel] = []
|
||||
_refreshData(row, integral_hash[channel], take_integral_times)
|
||||
@ -193,6 +201,7 @@ def incrementUpdateRank():
|
||||
for row in cursor:
|
||||
has_data = True
|
||||
channel = f7.getChannelByAccountId(row[0])
|
||||
if checkchannel(channel) == true:
|
||||
#更新击杀榜
|
||||
if channel not in kill_hash:
|
||||
kill_list = r.get('game2004api:kill_rank_' + channel)
|
||||
|
Loading…
x
Reference in New Issue
Block a user