Skip to main content

VendureWorker

VendureWorker

This object is created by calling the bootstrapWorker function.

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

app

property
INestApplicationContext

A reference to the INestApplicationContext object, which represents the NestJS standalone application instance.

constructor

method
(app: INestApplicationContext) => VendureWorker

startJobQueue

method
() => Promise<VendureWorker>

Starts the job queues running so that the worker can handle background jobs.

startHealthCheckServer

method
v1.2.0
(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.