Authored by 李奇

upgrade yoho-node-lib 0.6.7

... ... @@ -149,24 +149,27 @@ module.exports = {
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('redis连接不成功');
}
if (options.total_retry_time > 1000 * 60 * 60 * 6) {
console.log('redis连接超时');
return;
}
if (options.attempt > 10) {
return 1000 * 60 * 60 * 0.5;
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.0.1',
// host: '192.168.102.49',
port: '6379',
prefix: 'yohobuy_session:'
... ... @@ -214,18 +217,19 @@ if (isProduction) {
connect: {
host: 'web.redis.yohoops.org',
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;
}
if (options.attempt > 10) {
return 1000 * 60 * 60 * 0.5;
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: {
... ...
... ... @@ -57,7 +57,7 @@
"urlencode": "^1.1.0",
"uuid": "^2.0.2",
"yoho-express-session": "^2.0.0",
"yoho-node-lib": "=0.6.6",
"yoho-node-lib": "=0.6.7",
"yoho-zookeeper": "^1.0.8"
},
"devDependencies": {
... ...
... ... @@ -8670,9 +8670,9 @@ yoho-jquery@^1.12.4:
version "1.12.4"
resolved "http://npm.yohops.com/yoho-jquery/-/yoho-jquery-1.12.4.tgz#22499b325f293ee8b1d60559777348156494926d"
yoho-node-lib@=0.6.6:
version "0.6.6"
resolved "http://npm.yohops.com/yoho-node-lib/-/yoho-node-lib-0.6.6.tgz#2c727bed970d8829730ac077bd379aa506db16f3"
yoho-node-lib@=0.6.7:
version "0.6.7"
resolved "http://npm.yohops.com/yoho-node-lib/-/yoho-node-lib-0.6.7.tgz#1d176e7c4a980288ed7d0a7f1d9b3b37284837fb"
dependencies:
dnscache "^1.0.1"
handlebars "^4.0.5"
... ...