Merge pull request #747 from poolifier/multiple-functions
[poolifier.git] / src / pools / selection-strategies / less-busy-worker-choice-strategy.ts
index 708c491f63dea4183232c20f5d1c7373d14738ba..10fc3bf761f4908d8b1dd402f2ee2161310665f7 100644 (file)
@@ -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
     }