...
|
...
|
@@ -67,12 +67,6 @@ module.exports = { |
|
|
index: '//m.yohobuy.com'
|
|
|
},
|
|
|
useCache: false,
|
|
|
memcache: {
|
|
|
master: ['127.0.0.1:11211'],
|
|
|
session: ['127.0.0.1:11211'],
|
|
|
timeout: 1000,
|
|
|
retries: 0
|
|
|
},
|
|
|
interfaceShunt: {
|
|
|
open: false
|
|
|
},
|
...
|
...
|
@@ -80,9 +74,12 @@ module.exports = { |
|
|
infoFile: {
|
|
|
close: true,
|
|
|
name: 'info',
|
|
|
level: 'error',
|
|
|
level: 'info',
|
|
|
filename: 'logs/info.log',
|
|
|
maxFiles: 7
|
|
|
maxFiles: 7,
|
|
|
timestamp() {
|
|
|
return new Date().toString();
|
|
|
}
|
|
|
},
|
|
|
errorFile: {
|
|
|
close: true,
|
...
|
...
|
@@ -90,7 +87,10 @@ module.exports = { |
|
|
level: 'error',
|
|
|
filename: 'logs/error.log',
|
|
|
handleExceptions: true,
|
|
|
maxFiles: 7
|
|
|
maxFiles: 7,
|
|
|
timestamp() {
|
|
|
return new Date().toString();
|
|
|
}
|
|
|
},
|
|
|
console: {
|
|
|
level: 'debug',
|
...
|
...
|
@@ -132,19 +132,27 @@ module.exports = { |
|
|
connect: {
|
|
|
host: '127.0.0.1',
|
|
|
port: '6379',
|
|
|
password: '',
|
|
|
enable_offline_queue: false,
|
|
|
retry_strategy(options) {
|
|
|
if (options.error && options.error.code === 'ECONNREFUSED') {
|
|
|
console.log('redis连接不成功');
|
|
|
console.log('connect redis server fail');
|
|
|
}
|
|
|
if (options.total_retry_time > 1000 * 60 * 60 * 6) {
|
|
|
console.log('redis连接超时');
|
|
|
return;
|
|
|
}
|
|
|
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',
|
|
|
port: '6379',
|
|
|
pass: '',
|
|
|
prefix: 'yohobuy_session:'
|
|
|
}
|
|
|
},
|
|
|
REQUEST_LIMIT: {
|
...
|
...
|
@@ -180,24 +188,6 @@ if (isProduction) { |
|
|
extstore: 'http://extstore.yohobuy.com',
|
|
|
yohoNowApi: 'http://new.yohoboys.com/'
|
|
|
},
|
|
|
memcache: {
|
|
|
master: [
|
|
|
'memcache1.yohoops.org:12111',
|
|
|
'memcache2.yohoops.org:12111',
|
|
|
'memcache3.yohoops.org:12111',
|
|
|
'memcache4.yohoops.org:12111'
|
|
|
],
|
|
|
session: [
|
|
|
'memcache1.yohoops.org:12111',
|
|
|
'memcache2.yohoops.org:12111',
|
|
|
'memcache3.yohoops.org:12111',
|
|
|
'memcache4.yohoops.org:12111'
|
|
|
],
|
|
|
poolSize: 100,
|
|
|
reconnect: 5000,
|
|
|
timeout: 1000,
|
|
|
retries: 0
|
|
|
},
|
|
|
useCache: true,
|
|
|
interfaceShunt: {
|
|
|
open: false,
|
...
|
...
|
@@ -226,21 +216,29 @@ if (isProduction) { |
|
|
},
|
|
|
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: 'redis.web.yohoops.org',
|
|
|
port: '6379',
|
|
|
password: 'redis9646',
|
|
|
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: {
|
...
|
...
|
@@ -250,21 +248,26 @@ if (isProduction) { |
|
|
},
|
|
|
loggers: {
|
|
|
infoFile: {
|
|
|
close: true,
|
|
|
name: 'info',
|
|
|
level: 'error',
|
|
|
filename: 'logs/info.log',
|
|
|
maxFiles: 7
|
|
|
level: 'info',
|
|
|
filename: '/Data/log/yoho-yohobuy-wap/info.log',
|
|
|
maxFiles: 7,
|
|
|
timestamp() {
|
|
|
return new Date().toString();
|
|
|
}
|
|
|
},
|
|
|
errorFile: {
|
|
|
close: true,
|
|
|
name: 'error',
|
|
|
level: 'error',
|
|
|
filename: 'logs/error.log',
|
|
|
filename: '/Data/log/yoho-yohobuy-wap/error.log',
|
|
|
handleExceptions: true,
|
|
|
maxFiles: 7
|
|
|
maxFiles: 7,
|
|
|
timestamp() {
|
|
|
return new Date().toString();
|
|
|
}
|
|
|
},
|
|
|
console: {
|
|
|
close: true,
|
|
|
level: 'info',
|
|
|
colorize: 'all',
|
|
|
prettyPrint: true,
|
...
|
...
|
@@ -287,13 +290,6 @@ if (isProduction) { |
|
|
extstore: 'http://extstore-test1.yohops.com',
|
|
|
yohoNowApi: process.env.YOHO_NOW_API || 'http://yohonow-test.yohops.com:9999/'
|
|
|
},
|
|
|
memcache: {
|
|
|
master: ['127.0.0.1:12111'],
|
|
|
session: ['127.0.0.1:12111'],
|
|
|
timeout: 100,
|
|
|
reconnect: 5000,
|
|
|
retries: 0
|
|
|
},
|
|
|
useCache: true,
|
|
|
alipayConfig: {
|
|
|
payUrl: 'https://mapi.alipay.com/gateway.do',
|
...
|
...
|
|