feat: add tasks wait time account per worker
[poolifier.git] / src / pools / selection-strategies / less-busy-worker-choice-strategy.ts
index 8feac71c27f10a2cf1fc91ca8b559ebbc0543e89..02f51c6b0194dec3a0c21b38beadbad0a6b943ef 100644 (file)
@@ -26,7 +26,10 @@ export class LessBusyWorkerChoiceStrategy<
   public readonly requiredStatistics: RequiredStatistics = {
     runTime: true,
     avgRunTime: false,
-    medRunTime: false
+    medRunTime: false,
+    waitTime: false,
+    avgWaitTime: false,
+    medWaitTime: false
   }
 
   /** @inheritDoc */
@@ -35,7 +38,7 @@ export class LessBusyWorkerChoiceStrategy<
     opts: WorkerChoiceStrategyOptions = DEFAULT_WORKER_CHOICE_STRATEGY_OPTIONS
   ) {
     super(pool, opts)
-    this.checkOptions(this.opts)
+    this.setRequiredStatistics(this.opts)
   }
 
   /** @inheritDoc */
@@ -69,7 +72,7 @@ export class LessBusyWorkerChoiceStrategy<
   }
 
   /** @inheritDoc */
-  public remove (workerNodeKey: number): boolean {
+  public remove (): boolean {
     return true
   }
 }