change(ssr): re-connect to redis after 30s
All checks were successful
deploy / deploy (push) Successful in 1m3s

This commit is contained in:
Lee 2023-11-08 23:59:36 +00:00
parent 5822aa70bf
commit 1a5493be69

View File

@ -12,9 +12,9 @@ async function connectRedis(): Promise<any> {
client.on("error", (error) => {
console.error("There was an error connecting to redis: " + error);
setTimeout(() => {
redisClient = connectRedis();
}, 5_000); // 5 seconds
setTimeout(async () => {
redisClient = await connectRedis();
}, 30_000); // 30 seconds
});
return client;