12 lines
421 B
TypeScript
12 lines
421 B
TypeScript
import { ConnectionOptions, Queue } from 'bullmq';
|
|
|
|
export const connection: ConnectionOptions = {
|
|
url: process.env.REDIS_URL || 'redis://localhost:6379',
|
|
};
|
|
|
|
export const QUEUE_NAME = 'muzick-queue';
|
|
|
|
// Shared Queue instance used to register repeatable/scheduled jobs (e.g. the
|
|
// periodic integrity sweep). Producers in other services can import this too.
|
|
export const queue = new Queue(QUEUE_NAME, { connection });
|