build: update volta node.js version
[poolifier.git] / src / pools / selection-strategies / least-busy-worker-choice-strategy.ts
index aafc07dd6f8ac8f8faa47742bdda2e096449fd55..84476eedaf0c434f5bcce23aa7ca694f1bf9d267 100644 (file)
@@ -57,6 +57,11 @@ export class LeastBusyWorkerChoiceStrategy<
 
   /** @inheritDoc */
   public update (): boolean {
+    return true
+  }
+
+  /** @inheritDoc */
+  public choose (): number {
     let minTime = Infinity
     for (const [workerNodeKey, workerNode] of this.pool.workerNodes.entries()) {
       const workerTime =
@@ -70,11 +75,6 @@ export class LeastBusyWorkerChoiceStrategy<
         this.nextWorkerNodeId = workerNodeKey
       }
     }
-    return true
-  }
-
-  /** @inheritDoc */
-  public choose (): number {
     return this.nextWorkerNodeId
   }