Configuration
Options
name
Required:
false
Type:
string
Default:
Runner-<count>
- A unique name to identify the runner instance
concurrency
Required:
false
Type:
number
Default:
3
- Sets the concurrency of the runner
- Concurrency should be a positive integer, or
-1
- Setting concurrency as
-1
would run all tasks at once - If concurrency is not bound, throws a
RangeError
Hooks
onStart
Required:
false
Type:
function
Default:
undefined
- Fired whenever the runner goes from idle/paused to working state
Type:
onPause
Required:
false
Type:
function
Default:
undefined
- Fired whenever the runner goes from working to paused state
Type:
onDestroy
Required:
false
Type:
function
Default:
undefined
- Fired whenever the runner is destroyed
Type:
onAdd
Required:
false
Type:
function
Default:
undefined
- Fired every time a task/tasks are added to the queue
onRun
Required:
false
Type:
function
Default:
undefined
- Fired every time a task is picked up for execution
Type:
TasksList
, TasksCount
onDone
Required:
false
Type:
function
Default:
undefined
- Fired after every task’s completion
Type:
onRemove
Required:
false
Type:
function
Default:
undefined
- Fired every time a task/tasks are removed from the queue
onEnd
Required:
false
Type:
function
Default:
undefined
- Fired whenever the runner goes from working to idle state
Type: