@deep/nest-kit
    Preparing search index...

    Class BaseWorkerRunner

    Base class for a worker runner.

    Index

    Constructors

    Properties

    appConfig: AppConfigType
    jobsService: BaseJobsService
    loggerFactory: WinstonLoggerFactory
    moduleRef: ModuleRef
    userManager: BaseUserManager
    workerConfig: WorkerConfigType
    workerRegistry: WorkerRegistry

    Methods

    • Creates a service method context object for the worker's service account.

      Returns Promise<BaseServiceMethodContext>

      • A Promise that resolves with the service method context object.
    • Runs the worker in a loop, continuously processing jobs from the queue.

      Parameters

      Returns Promise<void>

      • A Promise that resolves when the worker loop is stopped.
    • Returns void

    • Runs the worker in either loop mode or one-job mode, depending on the configuration.

      Returns Promise<void>

      • A Promise that resolves when the worker has finished running.
    • Runs a job asynchronously.

      Parameters

      Returns Promise<void>

      A promise that resolves to void.

    • Asynchronously runs a job from the queue.

      Parameters

      Returns Promise<void>

      • A Promise that resolves when the job is finished processing.
      • If the job fails to process with an unhandled error or if it fails to process.