# Conflicts: # CHANGELOG.md # README.md # locales/index.d.ts # locales/ja-JP.yml # package.json # packages/backend/src/core/activitypub/models/ApNoteService.ts # packages/backend/src/server/api/endpoints/admin/avatar-decorations/list.ts # packages/backend/src/server/api/endpoints/get-avatar-decorations.ts # packages/backend/test/unit/entities/UserEntityService.ts # packages/frontend/src/components/MkFollowButton.vue # packages/frontend/src/components/MkTimeline.vue # packages/frontend/src/pages/about.vue # packages/frontend/src/pages/emoji-edit-dialog.vue # packages/frontend/src/ui/universal.vue
31 lines
874 B
TypeScript
31 lines
874 B
TypeScript
/*
|
|
* SPDX-FileCopyrightText: syuilo and misskey-project , Type4ny-project
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
*/
|
|
|
|
import { Config } from '@/config.js';
|
|
import type * as Bull from 'bullmq';
|
|
|
|
export const QUEUE = {
|
|
DELIVER: 'deliver',
|
|
INBOX: 'inbox',
|
|
SYSTEM: 'system',
|
|
ENDED_POLL_NOTIFICATION: 'endedPollNotification',
|
|
SCHEDULE_NOTE_POST: 'scheduleNotePost',
|
|
DB: 'db',
|
|
RELATIONSHIP: 'relationship',
|
|
OBJECT_STORAGE: 'objectStorage',
|
|
USER_WEBHOOK_DELIVER: 'userWebhookDeliver',
|
|
SYSTEM_WEBHOOK_DELIVER: 'systemWebhookDeliver',
|
|
};
|
|
|
|
export function baseQueueOptions(config: Config, queueName: typeof QUEUE[keyof typeof QUEUE]): Bull.QueueOptions {
|
|
return {
|
|
connection: {
|
|
...config.redisForJobQueue,
|
|
keyPrefix: undefined,
|
|
},
|
|
prefix: config.redisForJobQueue.prefix ? `${config.redisForJobQueue.prefix}:queue:${queueName}` : `queue:${queueName}`,
|
|
};
|
|
}
|