...
|
...
|
@@ -42,12 +42,32 @@ module.exports = { |
|
|
},
|
|
|
useOneapm: false,
|
|
|
useCache: true,
|
|
|
memcache: {
|
|
|
master: ['127.0.0.1:11211'],
|
|
|
slave: ['127.0.0.1:11211'],
|
|
|
session: ['127.0.0.1:11211'],
|
|
|
timeout: 1000,
|
|
|
retries: 0
|
|
|
redis: {
|
|
|
connect: {
|
|
|
host: '127.0.0.1',
|
|
|
|
|
|
// host: '192.168.102.49',
|
|
|
port: '6379',
|
|
|
enable_offline_queue: false,
|
|
|
retry_strategy(options) {
|
|
|
if (options.error && options.error.code === 'ECONNREFUSED') {
|
|
|
console.log('connect redis server fail');
|
|
|
}
|
|
|
|
|
|
if (options.attempt < 10) {
|
|
|
return Math.min(options.attempt * 100, 1000);
|
|
|
} else if (options.attempt > 10 && options.attempt < 100) {
|
|
|
return 1000;
|
|
|
} else {
|
|
|
return 1000 * 10;
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
session: {
|
|
|
host: '127.0.01',
|
|
|
port: '6379',
|
|
|
prefix: 'yohoblk_session:'
|
|
|
}
|
|
|
},
|
|
|
interfaceShunt: {
|
|
|
useInterfaceShunt: false,
|
...
|
...
|
@@ -64,25 +84,21 @@ module.exports = { |
|
|
infoFile: {
|
|
|
name: 'info',
|
|
|
level: 'info',
|
|
|
filename: 'logs/info.log',
|
|
|
filename: '/Data/logs/yohoblk-wap/info.log',
|
|
|
maxFiles: 7
|
|
|
},
|
|
|
errorFile: {
|
|
|
name: 'error',
|
|
|
level: 'error',
|
|
|
filename: 'logs/error.log',
|
|
|
filename: '/Data/logs/yohoblk-wap/error.log',
|
|
|
handleExceptions: true,
|
|
|
maxFiles: 7
|
|
|
},
|
|
|
udp: { // send by udp
|
|
|
level: 'debug', // logger level
|
|
|
host: 'influxdblog.yohoops.org', // influxdb host
|
|
|
port: '4444' // influxdb port
|
|
|
},
|
|
|
console: {
|
|
|
level: 'debug',
|
|
|
colorize: 'all',
|
|
|
prettyPrint: true
|
|
|
prettyPrint: true,
|
|
|
debugStdout: true
|
|
|
}
|
|
|
},
|
|
|
thirdLogin: {
|
...
|
...
|
@@ -101,12 +117,31 @@ if (isProduction) { |
|
|
service: 'http://api.yoho.yohoops.org/',
|
|
|
singleApi: 'http://api.yoho.yohoops.org/',
|
|
|
},
|
|
|
memcache: {
|
|
|
master: ['memcache1.yohoops.org:12111', 'memcache2.yohoops.org:12111', 'memcache3.yohoops.org:12111'],
|
|
|
slave: [],
|
|
|
session: ['memcache1.yohoops.org:12111', 'memcache2.yohoops.org:12111', 'memcache3.yohoops.org:12111'],
|
|
|
timeout: 100,
|
|
|
retries: 0
|
|
|
redis: {
|
|
|
connect: {
|
|
|
host: 'web.redis.yohoops.org',
|
|
|
port: '6379',
|
|
|
enable_offline_queue: false,
|
|
|
retry_strategy(options) {
|
|
|
if (options.error && options.error.code === 'ECONNREFUSED') {
|
|
|
console.log('connect redis server fail');
|
|
|
}
|
|
|
|
|
|
if (options.attempt < 10) {
|
|
|
return Math.min(options.attempt * 100, 1000);
|
|
|
} else if (options.attempt > 10 && options.attempt < 100) {
|
|
|
return 1000;
|
|
|
} else {
|
|
|
return 1000 * 10;
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
session: {
|
|
|
host: 'redis.web.yohoops.org',
|
|
|
port: '6379',
|
|
|
pass: 'redis9646',
|
|
|
prefix: 'yohoblk_session:'
|
|
|
}
|
|
|
},
|
|
|
useOneapm: true,
|
|
|
useCache: true,
|
...
|
...
|
@@ -125,25 +160,22 @@ if (isProduction) { |
|
|
infoFile: {
|
|
|
name: 'info',
|
|
|
level: 'info',
|
|
|
filename: 'logs/info.log',
|
|
|
filename: '/Data/logs/yohoblk-wap/info.log',
|
|
|
maxFiles: 7
|
|
|
},
|
|
|
errorFile: {
|
|
|
name: 'error',
|
|
|
level: 'error',
|
|
|
filename: 'logs/error.log',
|
|
|
filename: '/Data/logs/yohoblk-wap/error.log',
|
|
|
handleExceptions: true,
|
|
|
maxFiles: 7
|
|
|
},
|
|
|
udp: { // send by udp
|
|
|
level: 'debug', // logger level
|
|
|
host: 'influxdblog.yohoops.org', // influxdb host
|
|
|
port: '4444' // influxdb port
|
|
|
},
|
|
|
console: {
|
|
|
close: true,
|
|
|
level: 'info',
|
|
|
colorize: 'all',
|
|
|
prettyPrint: true
|
|
|
prettyPrint: true,
|
|
|
debugStdout: true
|
|
|
}
|
|
|
},
|
|
|
report: {
|
...
|
...
|
@@ -160,13 +192,6 @@ if (isProduction) { |
|
|
service: process.env.TEST_SERVICE || 'http://service-test1.yohops.com:9999/',
|
|
|
singleApi: process.env.TEST_SINGLE || 'http://api-test1.yohops.com:9999/'
|
|
|
},
|
|
|
memcache: {
|
|
|
master: ['127.0.0.1:11211'],
|
|
|
slave: ['127.0.0.1:11211'],
|
|
|
session: ['127.0.0.1:11211'],
|
|
|
timeout: 100,
|
|
|
retries: 0
|
|
|
},
|
|
|
useOneapm: true,
|
|
|
useCache: true
|
|
|
});
|
...
|
...
|
|