Constructor
# new Worker(supervisorOptions)
Returns a new Worker instance.
Parameters:
Name | Type | Description |
---|---|---|
supervisorOptions |
module:dcp/worker~SupervisorOptions |
Methods
# static disableWorker()
Disables worker instances from being started. The user will need to manually intervene to re-enable workers.
# async stop(immediateopt)
Stops the worker.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
immediate |
boolean |
<optional> |
false | Whether the worker should stop imediately or allow the current slices to finish. |