VendureWorker

VendureWorker

This object is created by calling the bootstrapWorker function.

Signature

class VendureWorker {
  public public app: INestApplicationContext;
  constructor(app: INestApplicationContext)
  async startJobQueue() => Promise<VendureWorker>;
  async startHealthCheckServer(healthCheckConfig: WorkerHealthCheckConfig) => Promise<VendureWorker>;
}

Members

app

public property
type:
INestApplicationContext
A reference to the INestApplicationContext object, which represents the NestJS standalone application instance.

constructor

method
type:
(app: INestApplicationContext) => VendureWorker

startJobQueue

async method
type:
() => Promise<VendureWorker>
Starts the job queues running so that the worker can handle background jobs.

startHealthCheckServer

async method
v1.2.0
type:
(healthCheckConfig: WorkerHealthCheckConfig) => Promise<VendureWorker>
Starts a simple http server which can be used as a health check on the worker instance. This endpoint can be used by container orchestration services such as Kubernetes to verify whether the worker is running.