Class

Worker

dcp/worker~Worker(supervisorOptions)

Constructor

# new Worker(supervisorOptions)

Returns a new Worker instance.

Parameters:
Name Type Description
supervisorOptions module:dcp/worker~SupervisorOptions

Members

SchedMsg

# schedMsg

boolean

# working

Methods

# static disableWorker()

Disables worker instances from being started. The user will need to manually intervene to re-enable workers.

# async start()

Starts the worker.

# 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.