fix(core): Don't let bull override the default redis config (#6897)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™ 2023-08-09 18:10:58 +02:00 committed by GitHub
parent 734d27fb7f
commit cfeb322b3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -46,6 +46,7 @@ export function getRedisStandardClient(
const { host, port, username, password, db }: RedisOptions = config.getEnv('queue.bull.redis');
const redisConnectionTimeoutLimit = config.getEnv('queue.bull.redis.timeoutThreshold');
const sharedRedisOptions: RedisOptions = {
...redisOptions,
host,
port,
username,
@ -53,7 +54,6 @@ export function getRedisStandardClient(
db,
enableReadyCheck: false,
maxRetriesPerRequest: null,
...redisOptions,
};
LoggerProxy.debug(
`Initialising Redis client${redisType ? ` of type ${redisType}` : ''} connection with host: ${
@ -94,12 +94,12 @@ export function getRedisClusterClient(
const { username, password, db }: RedisOptions = config.getEnv('queue.bull.redis');
const redisConnectionTimeoutLimit = config.getEnv('queue.bull.redis.timeoutThreshold');
const sharedRedisOptions: RedisOptions = {
...redisOptions,
username,
password,
db,
enableReadyCheck: false,
maxRetriesPerRequest: null,
...redisOptions,
};
LoggerProxy.debug(
`Initialising Redis cluster${