mirror of
https://github.com/nx-bat/discordbot-ng.git
synced 2026-09-22 10:29:10 -04:00
Add redis reconnect strategy
Attempt to reconnect to redis every minute if it closes unexpectedly
This commit is contained in:
@@ -82,7 +82,10 @@ let discordClient: Client;
|
||||
|
||||
export async function openRedisClient(url: string, discClient: Client) {
|
||||
const client = await createClient({
|
||||
url: `redis://${url}`
|
||||
url: `redis://${url}`,
|
||||
socket: {
|
||||
reconnectStrategy: 60000
|
||||
}
|
||||
});
|
||||
|
||||
await client.connect();
|
||||
|
||||
Reference in New Issue
Block a user