change(ssr): re-connect to redis after 30s
All checks were successful
deploy / deploy (push) Successful in 1m3s
All checks were successful
deploy / deploy (push) Successful in 1m3s
This commit is contained in:
parent
5822aa70bf
commit
1a5493be69
@ -12,9 +12,9 @@ async function connectRedis(): Promise<any> {
|
|||||||
|
|
||||||
client.on("error", (error) => {
|
client.on("error", (error) => {
|
||||||
console.error("There was an error connecting to redis: " + error);
|
console.error("There was an error connecting to redis: " + error);
|
||||||
setTimeout(() => {
|
setTimeout(async () => {
|
||||||
redisClient = connectRedis();
|
redisClient = await connectRedis();
|
||||||
}, 5_000); // 5 seconds
|
}, 30_000); // 30 seconds
|
||||||
});
|
});
|
||||||
|
|
||||||
return client;
|
return client;
|
||||||
|
Loading…
Reference in New Issue
Block a user