core-utils
    Preparing search index...

    Minimal adapter interface for background jobs operations supporting background-jobs-mongo (Mongo) and background-jobs-postgres (Postgres) implementations.

    interface BackgroundJobsAdapter {
        implementation: BackgroundJobsImplementation;
        enqueue<T>(
            handler: string | HandlerClassOrInstance<T>,
            data: T,
            options?: EnqueueOptions,
        ): Promise<unknown>;
    }
    Index

    Properties

    Methods

    Properties

    Methods

    • Enqueue a job to be processed.

      Type Parameters

      • T

      Parameters

      • handler: string | HandlerClassOrInstance<T>

        The handler class or instance that will process the job

      • data: T

        The data to be processed by the handler

      • Optionaloptions: EnqueueOptions

        Optional configuration for the job

      Returns Promise<unknown>

      A promise that resolves to the enqueued job or undefined (implementation-specific)