Showing
1 changed file
with
19 additions
and
0 deletions
@@ -238,6 +238,25 @@ if (isProduction) { | @@ -238,6 +238,25 @@ if (isProduction) { | ||
238 | session: ['192.168.104.15:12111', '192.168.104.29:12111', '192.168.104.32:12111'], | 238 | session: ['192.168.104.15:12111', '192.168.104.29:12111', '192.168.104.32:12111'], |
239 | timeout: 1000, | 239 | timeout: 1000, |
240 | retries: 0 | 240 | retries: 0 |
241 | + }, | ||
242 | + redis: { | ||
243 | + connect: { | ||
244 | + host: '192.168.104.32', | ||
245 | + port: '6379', | ||
246 | + retry_strategy(options) { | ||
247 | + if (options.error && options.error.code === 'ECONNREFUSED') { | ||
248 | + // console.log('redis连接不成功'); | ||
249 | + } | ||
250 | + if (options.total_retry_time > 1000 * 60 * 60 * 6) { | ||
251 | + // console.log('redis连接超时'); | ||
252 | + return; | ||
253 | + } | ||
254 | + if (options.attempt > 10) { | ||
255 | + return 1000 * 60 * 60 * 0.5; | ||
256 | + } | ||
257 | + return Math.min(options.attempt * 100, 1000); | ||
258 | + } | ||
259 | + } | ||
241 | } | 260 | } |
242 | }); | 261 | }); |
243 | } | 262 | } |
-
Please register or login to post a comment