fix: fix workey weights input validation
[poolifier.git] / src / pools / selection-strategies / less-used-worker-choice-strategy.ts
index 1503e057ef42fc3890eb0e8cfbc33496a1dd9f5e..a8daa7b9f43d05e871cf38e0822cb986ba671239 100644 (file)
@@ -27,7 +27,7 @@ export class LessUsedWorkerChoiceStrategy<
     opts: WorkerChoiceStrategyOptions = DEFAULT_WORKER_CHOICE_STRATEGY_OPTIONS
   ) {
     super(pool, opts)
-    this.checkOptions(this.opts)
+    this.setRequiredStatistics(this.opts)
   }
 
   /** @inheritDoc */
@@ -35,6 +35,11 @@ export class LessUsedWorkerChoiceStrategy<
     return true
   }
 
+  /** @inheritDoc */
+  public update (): boolean {
+    return true
+  }
+
   /** @inheritDoc */
   public choose (): number {
     const freeWorkerNodeKey = this.findFreeWorkerNodeKey()
@@ -57,7 +62,7 @@ export class LessUsedWorkerChoiceStrategy<
   }
 
   /** @inheritDoc */
-  public remove (workerNodeKey: number): boolean {
+  public remove (): boolean {
     return true
   }
 }