...
|
...
|
@@ -81,28 +81,20 @@ 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
|
|
|
},
|
|
|
interfaceShunt: {
|
|
|
open: false
|
|
|
},
|
|
|
loggers: {
|
|
|
infoFile: {
|
|
|
close: true,
|
|
|
name: 'info',
|
|
|
level: 'info',
|
|
|
filename: 'logs/info.log',
|
|
|
filename: '/Data/logs/yohobuy-node/info.log',
|
|
|
maxFiles: 14
|
|
|
},
|
|
|
errorFile: {
|
|
|
name: 'error',
|
|
|
level: 'error',
|
|
|
filename: 'logs/error.log',
|
|
|
filename: '/Data/logs/yohobuy-node/error.log',
|
|
|
handleExceptions: true,
|
|
|
maxFiles: 7
|
|
|
},
|
...
|
...
|
@@ -113,6 +105,7 @@ module.exports = { |
|
|
port: '4444' // influxdb port
|
|
|
},
|
|
|
console: {
|
|
|
close: true,
|
|
|
level: 'info',
|
|
|
colorize: 'all',
|
|
|
prettyPrint: true
|
...
|
...
|
@@ -153,24 +146,33 @@ module.exports = { |
|
|
cache: true
|
|
|
},
|
|
|
zookeeperServer: '192.168.102.168:2188',
|
|
|
sessionMemcachedPrefix: 'yohobuy_session:',
|
|
|
redis: {
|
|
|
connect: {
|
|
|
host: '192.168.102.49',
|
|
|
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('redis连接不成功');
|
|
|
}
|
|
|
if (options.total_retry_time > 1000 * 60 * 60 * 6) {
|
|
|
// console.log('redis连接超时');
|
|
|
return;
|
|
|
console.log('connect redis server fail');
|
|
|
}
|
|
|
if (options.attempt > 10) {
|
|
|
return 1000 * 60 * 60 * 0.5;
|
|
|
|
|
|
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;
|
|
|
}
|
|
|
return Math.min(options.attempt * 100, 1000);
|
|
|
}
|
|
|
},
|
|
|
session: {
|
|
|
host: '127.0.0.1',
|
|
|
|
|
|
// host: '192.168.102.49',
|
|
|
port: '6379',
|
|
|
prefix: 'yohobuy_session:'
|
|
|
}
|
|
|
},
|
|
|
REQUEST_LIMIT: {
|
...
|
...
|
@@ -204,19 +206,6 @@ if (isProduction) { |
|
|
unionApi: 'http://union.yoho.cn/',
|
|
|
yohoNowApi: 'http://new.yohoboys.com/',
|
|
|
},
|
|
|
memcache: {
|
|
|
master: ['memcache1.yohoops.org:12111', 'memcache2.yohoops.org:12111',
|
|
|
'memcache3.yohoops.org:12111', 'memcache4.yohoops.org:12111'],
|
|
|
slave: ['memcache1.yohoops.org:12112', 'memcache2.yohoops.org:12112',
|
|
|
'memcache3.yohoops.org:12112', 'memcache4.yohoops.org:12112'],
|
|
|
session: ['memcache1.yohoops.org:12111', 'memcache2.yohoops.org:12111',
|
|
|
'memcache3.yohoops.org:12111', 'memcache4.yohoops.org:12111'],
|
|
|
poolSize: 100,
|
|
|
reconnect: 5000,
|
|
|
timeout: 300,
|
|
|
retries: 0,
|
|
|
retry: 3000
|
|
|
},
|
|
|
useOneapm: true,
|
|
|
useCache: true,
|
|
|
interfaceShunt: {
|
...
|
...
|
@@ -226,21 +215,28 @@ if (isProduction) { |
|
|
zookeeperServer: 'web.zookeeper.yohoops.org:2181',
|
|
|
redis: {
|
|
|
connect: {
|
|
|
host: 'web.redis.yohoops.org'
|
|
|
},
|
|
|
port: '6379',
|
|
|
retry_strategy(options) {
|
|
|
if (options.error && options.error.code === 'ECONNREFUSED') {
|
|
|
console.log('redis连接不成功');
|
|
|
}
|
|
|
if (options.total_retry_time > 1000 * 60 * 60 * 6) {
|
|
|
console.log('redis连接超时');
|
|
|
return;
|
|
|
}
|
|
|
if (options.attempt > 10) {
|
|
|
return 1000 * 60 * 60 * 0.5;
|
|
|
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;
|
|
|
}
|
|
|
}
|
|
|
return Math.min(options.attempt * 100, 1000);
|
|
|
},
|
|
|
session: {
|
|
|
host: 'redis.web.yohoops.org',
|
|
|
port: '6379',
|
|
|
pass: 'redis9646',
|
|
|
prefix: 'yohobuy_session:'
|
|
|
}
|
|
|
},
|
|
|
report: {
|
...
|
...
|
@@ -264,32 +260,6 @@ if (isProduction) { |
|
|
yohoNowApi: process.env.YOHO_NOW_API || 'http://yohonow-test.yohops.com:9999/',
|
|
|
},
|
|
|
useOneapm: true,
|
|
|
useCache: true,
|
|
|
memcache: {
|
|
|
master: ['127.0.0.1:12111', '127.0.0.1:12111', '127.0.0.1:12111'],
|
|
|
slave: ['127.0.0.1:12112', '127.0.0.1:12112', '127.0.0.1:12112'],
|
|
|
session: ['120.0.0.1:12111', '127.0.0.1:12111', '127.0.0.1:12111'],
|
|
|
timeout: 1000,
|
|
|
retries: 0
|
|
|
},
|
|
|
redis: {
|
|
|
connect: {
|
|
|
host: '192.168.104.32',
|
|
|
port: '6379',
|
|
|
retry_strategy(options) {
|
|
|
if (options.error && options.error.code === 'ECONNREFUSED') {
|
|
|
// console.log('redis连接不成功');
|
|
|
}
|
|
|
if (options.total_retry_time > 1000 * 60 * 60 * 6) {
|
|
|
// console.log('redis连接超时');
|
|
|
return;
|
|
|
}
|
|
|
if (options.attempt > 10) {
|
|
|
return 1000 * 60 * 60 * 0.5;
|
|
|
}
|
|
|
return Math.min(options.attempt * 100, 1000);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
useCache: true
|
|
|
});
|
|
|
} |
...
|
...
|
|