import { BaseAppConfig } from '../../app'; import { type JobClass, type QueuedWorkerJob, type IJobOptions } from './types'; import { Queue, type Job as BullJob, type QueueOptions, type WorkerOptions } from 'bullmq'; export interface BullMqWorkerJobData { data: I; options: IJobOptions; } export interface BullMqCronJobSchedule { queue: string; name: string; pattern: string; tz?: string; } export interface RemovedBullMqJobScheduler { queue: string; name: string; pattern?: string; key: string; } export declare class WorkerQueueRegistry { private readonly config?; private static readonly queues; private static readonly bullQueues; private static nextId; private readonly bullQueues; constructor(config?: BaseAppConfig | undefined); usesBullMq(): boolean; getDefaultQueueName(): string; getQueueName(jobClass: JobClass, options?: IJobOptions): string; enqueue(jobClass: JobClass, data: I, options?: IJobOptions): Promise>; add(jobClass: JobClass, data: I, options?: IJobOptions): QueuedWorkerJob; getQueuedJobs(queue?: string): QueuedWorkerJob[]; getAllQueuedJobs(): QueuedWorkerJob[]; markCompleted(job: QueuedWorkerJob, result: unknown): void; markFailed(job: QueuedWorkerJob, result: unknown): void; remove(job: QueuedWorkerJob): void; clear(queue?: string): void; getBullQueue(queueName: string): Queue; getBullQueues(): Array<{ name: string; queue: Queue; }>; removeStaleBullMqJobSchedulers(desiredSchedules: readonly BullMqCronJobSchedule[]): Promise; /** * Stops a repeat chain after a worker has received an unregistered repeat job. This is a * defensive backstop for a job that was materialized while a stale scheduler was being removed. */ removeBullMqRepeatChain(queueName: string, repeatKey: string): Promise; normalizeJobData(data: I | null | undefined): I; fromBullJob(job: BullJob>, jobClass: JobClass): QueuedWorkerJob; shutdown(): Promise; static closeQueues(): Promise; getBullMqOptions(): QueueOptions & Pick; private unwrapBullMqJobData; private discoverBullMqJobSchedulerQueueNames; private removePendingBullMqRepeatJobs; } //# sourceMappingURL=queue.d.ts.map