新服:二测玩家测试服

This commit is contained in:
luying
2022-08-08 18:26:33 +08:00
parent 65f32f2738
commit 8e8d850f52
13 changed files with 311 additions and 21 deletions

View File

@@ -47,7 +47,7 @@ filePath.CONFIG_DIR = '/config';
const adminfilePath = _pinus.DEFAULT_ADMIN_PATH;
adminfilePath.ADMIN_FILENAME = 'adminUser';
adminfilePath.ADMIN_USER = 'config/adminUser';
const ALL_ENVS = 'stable|development|alpha|dev|isbn|monitor|monitor2|distribute|sq1';
const ALL_ENVS = 'stable|development|alpha|dev|isbn|monitor|monitor2|distribute|sq1|sq3';
/**
* 替换全局Promise
* 自动解析sourcemap

View File

@@ -20,7 +20,7 @@ import Counter from '../../../db/Counter';
import { getExpByLv } from '../../../pubUtils/data';
import { reportCreateRoleEventToTa, reportTAEvent, reportTAUserSet } from '../../../services/sdkService';
import { saveLoginAndOutLog } from '../../../pubUtils/logUtil';
import { sendMessageToAllWithSuc } from '../../../services/pushService';
import { sendMessageToAllWithSuc, sendMessageToUserWithSuc } from '../../../services/pushService';
import { getIpLocation } from '../../../services/roleService';
export default function (app: Application) {
@@ -249,6 +249,8 @@ export class EntryHandler {
// });
session.on('closed', this.onGmUserLeave.bind(this));
sendMessageToUserWithSuc(user.username, 'onGMENTER', {}, self.app.get('serverId'))
// put user into channel
return resResult(STATUS.SUCCESS, {
env: this.app.get('env')

View File

@@ -48,6 +48,7 @@ export class GmHandler {
console.log('*******', params);
let curRegion = await RegionModel.findRegionByEnv(params.env);
console.log('******* curRegion', curRegion);
if(!curRegion) return resResult(STATUS.WRONG_PARMS);
let { latestServer = 0 } = curRegion;

View File

@@ -15,7 +15,6 @@ import { HeroModel, HeroType } from '../db/Hero';
import { AttributeCal } from '../domain/roleField/attribute';
import { PvpEnemies, PvpHeroInfo, PvpOtherHeroes } from '../domain/dbGeneral';
import { DicWarJson } from '../pubUtils/dictionary/DicWarJson';
import { findWhere, findIndex } from 'underscore';
import { pinus } from 'pinus';
import { PvpHistoryOppModel, PvpHistoryOppType, PvpOppCreateParam } from '../db/PvpHistoryOpp';
import { Rank } from './rankService';

View File

@@ -54,4 +54,10 @@ module.exports = {
'redis': 'r-8vb7l1s8ne4vm6v6x6.redis.zhangbei.rds.aliyuncs.com',
'redispw': 'PANl3Vr2eozkq4N2'
},
'sq3': {
'mongo': 'mongodb://dbop:zyzSQ2022@dds-8vb9e0b130444f341.mongodb.zhangbei.rds.aliyuncs.com:3717,dds-8vb9e0b130444f342.mongodb.zhangbei.rds.aliyuncs.com:3717/zyz?replicaSet=mgset-510195956',
'gmmongo': 'mongodb://dbop:zyzSQGm2021@dds-8vb5de93552a67941.mongodb.zhangbei.rds.aliyuncs.com:3717,dds-8vb5de93552a67942.mongodb.zhangbei.rds.aliyuncs.com:3717,dds-8vb5de93552a67943.mongodb.zhangbei.rds.aliyuncs.com:3717/zyzgm?readPreference=secondary&replicaSet=mgset-508112742',
'redis': 'r-8vbq8kgkeqd4bbegwk.redis.zhangbei.rds.aliyuncs.com',
'redispw': 'bB^Ow3l@RMRSTtJU'
},
};

View File

@@ -56,7 +56,7 @@ module.exports = {
},
'sq3': {
'id': 'master-server-1',
'host': '172.16.4.108',
'host': '172.16.4.106',
'port': 3005
}
};

View File

@@ -331,28 +331,37 @@ module.exports = {
},
'sq3': {
'connector': [
{ 'id': 'connector-server-4', 'port': 4053, 'clientHost': 'sq1-game2-sgzzyz.yev242.com', 'host': '172.16.4.106', 'clientPort': 3053, 'frontend': true },
{ 'id': 'connector-server-5', 'port': 4054, 'clientHost': 'sq1-game2-sgzzyz.yev242.com', 'host': '172.16.4.106', 'clientPort': 3054, 'frontend': true },
],
'role': [
{ 'id': 'role-server-4', 'host': '172.16.4.106', 'port': 6063 },
{ 'id': 'role-server-5', 'host': '172.16.4.106', 'port': 6065 },
{ 'id': 'role-server-6', 'host': '172.16.4.106', 'port': 6066 },
{ 'id': 'connector-server-1', 'port': 4050, 'clientHost': 'sq3-game1-sgzzyz.yev242.com', 'host': '172.16.4.106', 'clientPort': 3050, 'frontend': true },
{ 'id': 'connector-server-2', 'port': 4051, 'clientHost': 'sq3-game1-sgzzyz.yev242.com', 'host': '172.16.4.106', 'clientPort': 3051, 'frontend': true },
{ 'id': 'connector-server-gm', 'port': 4099, 'clientHost': 'sq3-game1-sgzzyz.yev242.com', 'host': '172.16.4.106', 'clientPort': 3099, 'frontend': true, 'isGM': true },
],
'chat': [
{ 'id': 'chat-server-2', 'host': '172.16.4.106', 'port': 6069 },
{ 'id': 'chat-server-1', 'host': '172.16.4.106', 'port': 6050 },
],
'role': [
{ 'id': 'role-server-1', 'host': '172.16.4.106', 'port': 6053 },
{ 'id': 'role-server-2', 'host': '172.16.4.106', 'port': 6061 },
],
'battle': [
{ 'id': 'battle-server-3', 'host': '172.16.4.106', 'port': 6070 },
{ 'id': 'battle-server-4', 'host': '172.16.4.106', 'port': 6072 },
{ 'id': 'battle-server-1', 'host': '172.16.4.106', 'port': 6054 },
{ 'id': 'battle-server-2', 'host': '172.16.4.106', 'port': 6067 },
],
'gm': [
{ 'id': 'gm-server-1', 'host': '172.16.4.106', 'port': 6055 }
],
'systimer': [
{ 'id': 'systimer-server-1', 'host': '172.16.4.106', 'port': 6056 }
],
'guild': [
{ 'id': 'guild-server-3', 'host': '172.16.4.106', 'port': 6071 },
{ 'id': 'guild-server-4', 'host': '172.16.4.106', 'port': 6073 },
{ 'id': 'guild-server-5', 'host': '172.16.4.106', 'port': 6074 },
{ 'id': 'guild-server-1', 'host': '172.16.4.106', 'port': 6057 },
{ 'id': 'guild-server-2', 'host': '172.16.4.106', 'port': 6058 }
],
'activity': [
{ 'id': 'activity-server-1', 'host': '172.16.4.106', 'port': 6059 },
{ 'id': 'activity-server-2', 'host': '172.16.4.106', 'port': 6068 },
],
'order': [
{ 'id': 'order-server-2', 'host': '172.16.4.106', 'port': 6064 },
],
{ 'id': 'order-server-1', 'host': '172.16.4.106', 'port': 6060 },
]
},
};

View File

@@ -0,0 +1,177 @@
module.exports = {
'appenders': {
'console': {
'type': 'console'
},
'con-log': {
'type': 'file',
'filename': '/zyz_logs/log4js/con-log-${opts:serverId}.log',
'pattern': 'connector',
'maxLogSize': 104857600,
'layout': {
'type': 'basic'
},
'backups': 5
},
'rpc-log': {
'type': 'file',
'filename': '/zyz_logs/log4js/rpc-log-${opts:serverId}.log',
'maxLogSize': 104857600,
'layout': {
'type': 'basic'
},
'backups': 5
},
'forward-log': {
'type': 'file',
'filename': '/zyz_logs/log4js/forward-log-${opts:serverId}.log',
'maxLogSize': 104857600,
'layout': {
'type': 'basic'
},
'backups': 5
},
'rpc-debug': {
'type': 'file',
'filename': '/zyz_logs/log4js/rpc-debug-${opts:serverId}.log',
'maxLogSize': 104857600,
'layout': {
'type': 'basic'
},
'backups': 5
},
'crash-log': {
'type': 'file',
'filename': '/zyz_logs/log4js/crash.log',
'maxLogSize': 104857600,
'layout': {
'type': 'basic'
},
'backups': 5
},
'admin-log': {
'type': 'file',
'filename': '/zyz_logs/log4js/admin.log',
'maxLogSize': 104857600,
'layout': {
'type': 'basic'
},
'backups': 5
},
'pinus': {
'type': 'file',
'filename': '/zyz_logs/log4js/pinus-${opts:serverId}.log',
'maxLogSize': 1073741824,
'layout': {
'type': 'basic'
},
'backups': 20
},
'pinus-admin': {
'type': 'file',
'filename': '/zyz_logs/log4js/pinus-admin.log',
'maxLogSize': 104857600,
'layout': {
'type': 'basic'
},
'backups': 5
},
'pinus-rpc': {
'type': 'file',
'filename': '/zyz_logs/log4js/pinus-rpc-${opts:serverId}.log',
'maxLogSize': 104857600,
'layout': {
'type': 'basic'
},
'backups': 5
},
'app': {
'type': 'file',
'filename': '/zyz_logs/sls/app.log',
'maxLogSize': 1073741824,
'layout': {
'type': 'basic'
},
'backups': 20
},
'error': {
'type': 'file',
'filename': '/zyz_logs/sls/error.log',
'maxLogSize': 1073741824,
'layout': {
'type': 'basic'
},
'backups': 5
},
'ta': {
'type': 'file',
'filename': '/zyz_logs/ta/log',
'pattern': 'yyyy-MM-dd-hh',
'alwaysIncludePattern': true,
'layout': {
'type': 'pattern',
'pattern': '%m',
},
'backups': 240,
}
},
'categories': {
'default': {
'appenders': ['console', 'pinus'],
'level': 'debug'
},
'con-log': {
'appenders': ['con-log'],
'level': 'debug'
},
'rpc-log': {
'appenders': ['rpc-log'],
'level': 'debug'
},
'forward-log': {
'appenders': ['forward-log'],
'level': 'debug'
},
'rpc-debug': {
'appenders': ['rpc-debug'],
'level': 'debug'
},
'crash-log': {
'appenders': ['crash-log'],
'level': 'debug'
},
'admin-log': {
'appenders': ['admin-log'],
'level': 'debug'
},
'pinus-admin': {
'appenders': ['pinus-admin'],
'level': 'debug'
},
'pinus-rpc': {
'appenders': ['pinus-rpc'],
'level': 'debug'
},
'pinus': {
'appenders': ['pinus'],
'level': 'debug'
},
'info': {
'appenders': ['console', 'app'],
'level': 'debug'
},
'err': {
'appenders': ['console', 'error'],
'level': 'debug'
},
'ta': {
'appenders': ['console', 'ta'],
'level': 'info'
}
},
'replaceConsole': true,
'lineDebug': false,
'errorStack': true
};