...
|
...
|
@@ -131,7 +131,27 @@ module.exports = { |
|
|
},
|
|
|
zookeeperServer: '192.168.102.168:2188',
|
|
|
maxQps: 1200,
|
|
|
sessionMemcachedPrefix: 'yohobuy_session:'
|
|
|
sessionMemcachedPrefix: 'yohobuy_session:',
|
|
|
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) {
|
|
|
console.log('redis连接超时');
|
|
|
return undefined;
|
|
|
}
|
|
|
if (options.attempt > 10) {
|
|
|
console.log('redis连接超过次数');
|
|
|
return undefined;
|
|
|
}
|
|
|
return Math.min(options.attempt * 100, 1000);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
|
|
|
if (isProduction) {
|
...
|
...
|
|