NestJS Bull Processor Decorator (decorators/processor.decorator.ts)

nestjs/bull · packages/bullmq/lib/decorators/processor.decorator.ts · typescript · MIT
automation, infra, fw:nestjs, tag:processor, tag:decorator

Decorator to define a worker that processes jobs from a Bull queue, supporting scope and configuration options.

// Source: https://github.com/nestjs/bull | License: MIT | Copyright Kamil Mysliwiec & Frédéric Woelffel
// Provided via justclaw.it.com; keep this notice with the code.
import { Scope, SetMetadata } from '@nestjs/common';
import { SCOPE_OPTIONS_METADATA } from '@nestjs/common/constants.js';
import { PROCESSOR_METADATA, WORKER_METADATA } from '../bull.constants.js';
import { NestWorkerOptions } from '../interfaces/worker-options.interface.js';

/**
 * @publicApi
 */
export interface ProcessorOptions {
  /**
   * Specifies the name of the queue to subscribe to.
   */
  name?: string;
  /**
   * Specifies the lifetime of an injected Processor.
   */
  scope?: Scope;
  /**
   * A key (configuration key) under which the queue/connection configuration should be available.
   */
  configKey?: st

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key