opts: WorkerChoiceStrategyOptions = DEFAULT_WORKER_CHOICE_STRATEGY_OPTIONS
) {
super(pool, opts)
- this.setTaskStatistics(this.opts)
+ this.setTaskStatisticsRequirements(this.opts)
}
/** @inheritDoc */
for (const [workerNodeKey, workerNode] of this.pool.workerNodes.entries()) {
const workerTaskStatistics = workerNode.workerUsage.tasks
const workerTasks =
- workerTaskStatistics.executed + workerTaskStatistics.executing
+ workerTaskStatistics.executed +
+ workerTaskStatistics.executing +
+ workerTaskStatistics.queued
if (workerTasks === 0) {
return workerNodeKey
} else if (workerTasks < minNumberOfTasks) {