yappa kousuru

This commit is contained in:
tamaina 2023-07-20 10:11:58 +00:00
parent 8a0a54700c
commit 11197ccd0b
5 changed files with 38 additions and 85 deletions

View file

@ -14,14 +14,7 @@ export const QUEUE = {
export function baseQueueOptions(config: Config, queueName: typeof QUEUE[keyof typeof QUEUE]): Bull.QueueOptions {
return {
connection: {
port: config.redisForJobQueue.port,
host: config.redisForJobQueue.host,
family: config.redisForJobQueue.family == null ? 0 : config.redisForJobQueue.family,
password: config.redisForJobQueue.pass,
db: config.redisForJobQueue.db ?? 0,
...(config.redisForJobQueue.extra ?? {}),
},
connection: config.redisForJobQueue,
prefix: config.redisForJobQueue.prefix ? `${config.redisForJobQueue.prefix}:queue:${queueName}` : `queue:${queueName}`,
};
}