core-utils
    Preparing search index...

    Interface BackgroundJobsAdapter<TImplementation>

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

    interface BackgroundJobsAdapter<
        TImplementation extends
            BackgroundJobsImplementation = BackgroundJobsImplementation,
    > {
        implementation: TImplementation;
        enqueue<T>(
            handler: string | HandlerClassOrInstance<T>,
            data: T,
            options?: TImplementation extends "mongo"
                ? MongoEnqueueOptions
                : TImplementation extends "postgres"
                    ? PostgresEnqueueOptions
                    : EnqueueOptions,
        ): Promise<unknown>;
    }

    Type Parameters

    Index

    Properties

    Methods

    Properties

    implementation: TImplementation

    Methods