reanme 2005->2006
This commit is contained in:
parent
94e1621905
commit
c75994a858
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "game2005api",
|
||||
"name": "game2006api",
|
||||
"version": "0.1.0",
|
||||
"description": "极乐精英",
|
||||
"title": "极乐精英",
|
||||
"url" : "https://game2005api-test.kingsome.cn/"
|
||||
"url" : "https://game2006api-test.kingsome.cn/"
|
||||
}
|
||||
|
@ -1,3 +1,3 @@
|
||||
{
|
||||
"name": "game2005api"
|
||||
"name": "game2006api"
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ import functools
|
||||
import test
|
||||
|
||||
|
||||
CONFIG_DIR = '../config' if f7.isOnlineEnv() else '/var/data/conf_test/game2005api_rankserver/config'
|
||||
CONFIG_DIR = '../config' if f7.isOnlineEnv() else '/var/data/conf_test/game2006api_rankserver/config'
|
||||
|
||||
def _take_pass(elem):
|
||||
return elem[3]
|
||||
@ -96,7 +96,7 @@ def _updateScoreRank(r, channel, integral_list):
|
||||
integral_rank = []
|
||||
for integral_index in range(min(50, len(integral_list))):
|
||||
integral_rank.append(integral_list[integral_index])
|
||||
r.set("game2005api:integral_rank_" + channel, json.dumps(integral_rank))
|
||||
r.set("game2006api:integral_rank_" + channel, json.dumps(integral_rank))
|
||||
|
||||
def fullUpdateRank():
|
||||
f7.udplog.info('fullUpdateRank begin')
|
||||
@ -107,7 +107,7 @@ def fullUpdateRank():
|
||||
port = conf['port'],
|
||||
user = conf['user'],
|
||||
passwd = conf['passwd'],
|
||||
db = 'gamedb2005_' + str(conf['instance_id']),
|
||||
db = 'gamedb2006_' + str(conf['instance_id']),
|
||||
charset = 'utf8'
|
||||
)
|
||||
cursor = conn.cursor()
|
||||
@ -156,7 +156,7 @@ def incrementUpdateRank():
|
||||
port = conf['port'],
|
||||
user = conf['user'],
|
||||
passwd = conf['passwd'],
|
||||
db = 'gamedb2005_' + str(conf['instance_id']),
|
||||
db = 'gamedb2006_' + str(conf['instance_id']),
|
||||
charset = 'utf8'
|
||||
)
|
||||
cursor = conn.cursor()
|
||||
@ -173,7 +173,7 @@ def incrementUpdateRank():
|
||||
if checkchannel(channel):
|
||||
#更新积分榜
|
||||
if channel not in integral_hash:
|
||||
integral_list = r.get('game2005api:integral_rank_' + channel)
|
||||
integral_list = r.get('game2006api:integral_rank_' + channel)
|
||||
integral_hash[channel] = [] if not integral_list else json.loads(integral_list)
|
||||
_delRepeatData(row, integral_hash[channel])
|
||||
_refreshData(row, integral_hash[channel], take_integral_times)
|
||||
@ -198,7 +198,7 @@ def _incrementUpdateRank(rushtime):
|
||||
if __name__ == "__main__":
|
||||
q7.xPrint('pid %d' % os.getpid())
|
||||
test.say()
|
||||
f7.app.init('/data/logs/game2005_rankserver/logs')
|
||||
f7.app.init('/data/logs/game2006_rankserver/logs')
|
||||
f7.udplog.info('rankserver start pid:' + str(os.getpid()))
|
||||
|
||||
conf = json.loads(open(CONFIG_DIR + '/rankserver.json', 'r').read())
|
||||
|
@ -15,7 +15,7 @@ import redis
|
||||
import os
|
||||
|
||||
if f7.isOnlineEnv():
|
||||
import game2005_rankserver as app
|
||||
import game2006_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, "game2005api:kill_rank_*")
|
||||
win_keys = f7.scanRedisKey(r, "game2005api:win_rank_*")
|
||||
integral_keys = f7.scanRedisKey(r, "game2005api:integral_rank_*")
|
||||
kill_keys = f7.scanRedisKey(r, "game2006api:kill_rank_*")
|
||||
win_keys = f7.scanRedisKey(r, "game2006api:win_rank_*")
|
||||
integral_keys = f7.scanRedisKey(r, "game2006api: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/game2005_rankserver_cmd/logs')
|
||||
f7.udplog.info('game2005_rankserver_cmd start pid:' + str(os.getpid()))
|
||||
f7.app.init('/data/logs/game2006_rankserver_cmd/logs')
|
||||
f7.udplog.info('game2006_rankserver_cmd start pid:' + str(os.getpid()))
|
||||
processCmdLine(sys.argv[1])
|
||||
f7.app.start()
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
$g_conf_mysql_cluster = require('../config/game2005api.mysql.cluster.php');
|
||||
$g_conf_redis_cluster = require('../config/game2005api.redis.cluster.php');
|
||||
$g_conf_mysql_cluster = require('../config/game2006api.mysql.cluster.php');
|
||||
$g_conf_redis_cluster = require('../config/game2006api.redis.cluster.php');
|
||||
$g_metatables = array();
|
||||
|
||||
function checkMysqlConfig()
|
||||
@ -10,7 +10,7 @@ function checkMysqlConfig()
|
||||
global $g_conf_mysql_cluster;
|
||||
foreach ($g_conf_mysql_cluster as $instance) {
|
||||
if ($instance_id != $instance['instance_id']) {
|
||||
error_log('game2005api.mysql.cluster.php config error');
|
||||
error_log('game2006api.mysql.cluster.php config error');
|
||||
die();
|
||||
}
|
||||
$instance_id++;
|
||||
@ -23,7 +23,7 @@ function checkRedisConfig()
|
||||
global $g_conf_redis_cluster;
|
||||
foreach ($g_conf_redis_cluster as $instance) {
|
||||
if ($instance_id != $instance['instance_id']) {
|
||||
error_log('game2005api.redis.cluster.php config error');
|
||||
error_log('game2006api.redis.cluster.php config error');
|
||||
die();
|
||||
}
|
||||
$instance_id++;
|
||||
|
@ -23,7 +23,7 @@ class NameService extends BaseService {
|
||||
't_used_name',
|
||||
array(
|
||||
'name_base64' => $nameBase64,
|
||||
'key' => '2005'
|
||||
'key' => '2006'
|
||||
)
|
||||
);
|
||||
return !empty($row);
|
||||
@ -39,7 +39,7 @@ class NameService extends BaseService {
|
||||
array(
|
||||
'name' => $name,
|
||||
'name_base64' => $nameBase64,
|
||||
'key' => '2005',
|
||||
'key' => '2006',
|
||||
'account_id' => myself()->_getAccountId(),
|
||||
'createtime' => myself()->_getNowTime(),
|
||||
'modifytime' => myself()->_getNowTime()
|
||||
|
Loading…
x
Reference in New Issue
Block a user