Authored by 周少峰

redis

... ... @@ -238,6 +238,25 @@ if (isProduction) {
session: ['192.168.104.15:12111', '192.168.104.29:12111', '192.168.104.32: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);
}
}
}
});
}
... ...