Add a reconnection interval constant

This commit is contained in:
2025-09-01 12:06:23 -07:00
parent 051f6c12e7
commit 72b77c3b60
2 changed files with 4 additions and 1 deletions

View File

@@ -1,4 +1,5 @@
import { createClient } from 'redis';
import { REDIS_RECONNECT_INTERVAL } from "../environment";
export abstract class BaseRedisRepository {
protected redisClient;
@@ -9,7 +10,8 @@ export abstract class BaseRedisRepository {
socket: {
tls: process.env.NODE_ENV === 'production',
rejectUnauthorized: false,
}
reconnectStrategy: REDIS_RECONNECT_INTERVAL,
},
}),
) {
this.redisClient = redisClient;