X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fpools%2Fselection-strategies%2Fless-busy-worker-choice-strategy.ts;h=10fc3bf761f4908d8b1dd402f2ee2161310665f7;hb=2092c35fc1873fb746244f15af3478e246bb4b3b;hp=708c491f63dea4183232c20f5d1c7373d14738ba;hpb=2fc5cae38554901a21435ef087036a062c9d1632;p=poolifier.git diff --git a/src/pools/selection-strategies/less-busy-worker-choice-strategy.ts b/src/pools/selection-strategies/less-busy-worker-choice-strategy.ts index 708c491f..10fc3bf7 100644 --- a/src/pools/selection-strategies/less-busy-worker-choice-strategy.ts +++ b/src/pools/selection-strategies/less-busy-worker-choice-strategy.ts @@ -35,7 +35,7 @@ export class LessBusyWorkerChoiceStrategy< opts: WorkerChoiceStrategyOptions = DEFAULT_WORKER_CHOICE_STRATEGY_OPTIONS ) { super(pool, opts) - this.checkOptions(opts) + this.checkOptions(this.opts) } /** @inheritDoc */ @@ -45,7 +45,7 @@ export class LessBusyWorkerChoiceStrategy< /** @inheritDoc */ public choose (): number { - const freeWorkerNodeKey = this.pool.findFreeWorkerNodeKey() + const freeWorkerNodeKey = this.findFreeWorkerNodeKey() if (freeWorkerNodeKey !== -1) { return freeWorkerNodeKey }