Readonly
emitterReadonly
offRest
...args: Args<BatchClusterEvents[E]>BatchClusterEvents
v9.0.0
Readonly
onRest
...args: Args<BatchClusterEvents[E]>BatchClusterEvents
Readonly
optionsthe current number of child processes currently servicing tasks
For integration tests:
true if all previously-enqueued tasks have settled
the mean number of tasks completed by child processes
the number of pending tasks
the current number of spawned child processes. Some (or all) may be idle.
the total number of child processes created by this instance
Get ended process counts (used for tests)
For diagnostics. Contents may change.
BatchCluster instances manage 0 or more homogeneous child processes, and provide the main interface for enqueuing
Task
s viaenqueueTask
.Given the large number of configuration options, the constructor receives a single options hash. The most important of these are the
ChildProcessFactory
, which specifies the factory that creates ChildProcess instances, andBatchProcessOptions
, which specifies how child tasks can be verified and shut down.