Revert "enhance(backend): redisForJobQueue の接続を使い回す (MisskeyIO#268)" (MisskeyIO#292)
This reverts commit 7122657f13
.
This commit is contained in:
parent
f207c962b5
commit
bd265caf65
6 changed files with 34 additions and 55 deletions
|
@ -5,7 +5,6 @@
|
|||
|
||||
import { Config } from '@/config.js';
|
||||
import type * as Bull from 'bullmq';
|
||||
import type * as Redis from 'ioredis';
|
||||
|
||||
export const QUEUE = {
|
||||
DELIVER: 'deliver',
|
||||
|
@ -18,9 +17,13 @@ export const QUEUE = {
|
|||
WEBHOOK_DELIVER: 'webhookDeliver',
|
||||
};
|
||||
|
||||
export function baseQueueOptions(config: Config, queueName: typeof QUEUE[keyof typeof QUEUE], redisConnection: Redis.Redis): Bull.QueueOptions {
|
||||
export function baseQueueOptions(config: Config, queueName: typeof QUEUE[keyof typeof QUEUE]): Bull.QueueOptions {
|
||||
return {
|
||||
connection: redisConnection,
|
||||
connection: {
|
||||
...config.redisForJobQueue,
|
||||
maxRetriesPerRequest: null,
|
||||
keyPrefix: undefined,
|
||||
},
|
||||
prefix: config.redisForJobQueue.prefix ? `${config.redisForJobQueue.prefix}:queue:${queueName}` : `queue:${queueName}`,
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue