set max listeners
This commit is contained in:
parent
110c8a0948
commit
a289115207
@ -21,9 +21,11 @@ const redisOptions: RedisOptions = {
|
|||||||
// create a new connection to the Redis with every change either.
|
// create a new connection to the Redis with every change either.
|
||||||
if (process.env.NODE_ENV === "production") {
|
if (process.env.NODE_ENV === "production") {
|
||||||
redis = new Redis(serverConfig.redis.url, redisOptions);
|
redis = new Redis(serverConfig.redis.url, redisOptions);
|
||||||
|
redis.setMaxListeners(32);
|
||||||
} else {
|
} else {
|
||||||
if (!global.__redis) {
|
if (!global.__redis) {
|
||||||
global.__redis = new Redis(serverConfig.redis.url, redisOptions);
|
global.__redis = new Redis(serverConfig.redis.url, redisOptions);
|
||||||
|
global.__redis.setMaxListeners(32);
|
||||||
}
|
}
|
||||||
redis = global.__redis;
|
redis = global.__redis;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user