*/
protected getWorkerTaskWaitTime (workerNodeKey: number): number {
return this.taskStatisticsRequirements.waitTime.median
- ? this.pool.workerNodes[workerNodeKey].workerUsage.runTime.median
- : this.pool.workerNodes[workerNodeKey].workerUsage.runTime.average
+ ? this.pool.workerNodes[workerNodeKey].workerUsage.waitTime.median
+ : this.pool.workerNodes[workerNodeKey].workerUsage.waitTime.average
}
/**
} else if (message.parent != null) {
// Main worker reference message received
this.mainWorker = message.parent
+ } else if (message.statistics != null) {
+ // Statistics message received
+ this.statistics = message.statistics
} else if (message.kill != null) {
// Kill message received
this.aliveInterval != null && clearInterval(this.aliveInterval)
this.emitDestroy()
- } else if (message.statistics != null) {
- // Statistics message received
- this.statistics = message.statistics
}
}