opts: WorkerChoiceStrategyOptions = DEFAULT_WORKER_CHOICE_STRATEGY_OPTIONS
) {
super(pool, opts)
- this.setRequiredStatistics(this.opts)
+ this.setTaskStatistics(this.opts)
}
/** @inheritDoc */
let leastUsedWorkerNodeKey!: number
for (const [workerNodeKey, workerNode] of this.pool.workerNodes.entries()) {
const tasksUsage = workerNode.tasksUsage
- const workerTasks = tasksUsage.run + tasksUsage.running
+ const workerTasks = tasksUsage.ran + tasksUsage.running
if (workerTasks === 0) {
return workerNodeKey
} else if (workerTasks < minNumberOfTasks) {