...
|
...
|
@@ -17,18 +17,18 @@ module.exports = { |
|
|
cookieDomain: '.yohobuy.com',
|
|
|
domains: {
|
|
|
// test3
|
|
|
// singleApi: 'http://api-test3.yohops.com:9999/',
|
|
|
// api: 'http://api-test3.yohops.com:9999/',
|
|
|
// service: 'http://service-test3.yohops.com:9999/',
|
|
|
// serviceNotify: 'http://service-test3.yohops.com:9999/',
|
|
|
// global: 'http://global-test-soa.yohops.com:9999/',
|
|
|
singleApi: 'http://api-test3.yohops.com:9999/',
|
|
|
api: 'http://api-test3.yohops.com:9999/',
|
|
|
service: 'http://service-test3.yohops.com:9999/',
|
|
|
serviceNotify: 'http://service-test3.yohops.com:9999/',
|
|
|
global: 'http://global-test-soa.yohops.com:9999/',
|
|
|
|
|
|
// prod
|
|
|
singleApi: 'http://single.yoho.cn/',
|
|
|
api: 'http://api.yoho.cn/',
|
|
|
service: 'http://service.yoho.cn/',
|
|
|
serviceNotify: 'http://service.yoho.cn/',
|
|
|
global: 'http://api-global.yohobuy.com/',
|
|
|
// singleApi: 'http://single.yoho.cn/',
|
|
|
// api: 'http://api.yoho.cn/',
|
|
|
// service: 'http://service.yoho.cn/',
|
|
|
// serviceNotify: 'http://service.yoho.cn/',
|
|
|
// global: 'http://api-global.yohobuy.com/',
|
|
|
|
|
|
// gray
|
|
|
// singleApi: 'http://single.gray.yohops.com/',
|
...
|
...
|
@@ -133,7 +133,25 @@ module.exports = { |
|
|
maxQps: 1200,
|
|
|
sessionMemcachedPrefix: 'yohobuy_session:',
|
|
|
baiduToken: '0lSAO4ZxEKsYopMG', // 百度站长推送的token
|
|
|
sitemapPath: './files'
|
|
|
redis: {
|
|
|
connect: {
|
|
|
host: '127.0.0.1',
|
|
|
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);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
|
|
|
if (isProduction) {
|
...
|
...
|
@@ -167,7 +185,26 @@ if (isProduction) { |
|
|
open: false,
|
|
|
url: 'http://123.206.2.55/strategy'
|
|
|
},
|
|
|
zookeeperServer: 'web.zookeeper.yohoops.org:2181'
|
|
|
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;
|
|
|
}
|
|
|
return Math.min(options.attempt * 100, 1000);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
} else if (isTest) {
|
|
|
Object.assign(module.exports, {
|
...
|
...
|
|