fix
This commit is contained in:
parent
dfd6b4f213
commit
227f19ff3a
|
@ -108,9 +108,9 @@ export type Mixin = {
|
||||||
mediaProxy: string;
|
mediaProxy: string;
|
||||||
externalMediaProxyEnabled: boolean;
|
externalMediaProxyEnabled: boolean;
|
||||||
videoThumbnailGenerator: string | null;
|
videoThumbnailGenerator: string | null;
|
||||||
redis: RedisOptions & RedisOptionsSource;
|
redis: RedisOptions;
|
||||||
redisForPubsub: RedisOptions & RedisOptionsSource;
|
redisForPubsub: RedisOptions;
|
||||||
redisForJobQueue: RedisOptions & RedisOptionsSource;
|
redisForJobQueue: RedisOptions;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type Config = Source & Mixin;
|
export type Config = Source & Mixin;
|
||||||
|
@ -188,10 +188,12 @@ function tryCreateUrl(url: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function convertRedisOptions(options: RedisOptionsSource, host: string): RedisOptions {
|
function convertRedisOptions(options: RedisOptionsSource, host: string): RedisOptions {
|
||||||
return {
|
const result = {
|
||||||
...options,
|
...options,
|
||||||
family: options.family == null ? 0 : options.family,
|
family: options.family == null ? 0 : options.family,
|
||||||
keyPrefix: `${options.prefix ?? host}:`,
|
keyPrefix: `${options.prefix ?? host}:`,
|
||||||
db: options.db ?? 0,
|
db: options.db ?? 0,
|
||||||
};
|
};
|
||||||
|
delete result.prefix;
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,6 @@ export function baseQueueOptions(config: Config, queueName: typeof QUEUE[keyof t
|
||||||
...config.redisForJobQueue,
|
...config.redisForJobQueue,
|
||||||
keyPrefix: undefined
|
keyPrefix: undefined
|
||||||
},
|
},
|
||||||
prefix: config.redisForJobQueue.prefix ? `${config.redisForJobQueue.prefix}:queue:${queueName}` : `queue:${queueName}`,
|
prefix: config.redisForJobQueue.keyPrefix ? `${config.redisForJobQueue.keyPrefix}queue:${queueName}` : `queue:${queueName}`,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue