refactor: trivial code cleanup
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 23 Aug 2023 13:16:59 +0000 (15:16 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 23 Aug 2023 13:16:59 +0000 (15:16 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
src/pools/abstract-pool.ts

index d1bb5bc4e0fa1c8fc2dc1f8d650f81efe66cfec8..a4d83b593cd52b4927aa480f557227e788d6cfeb 100644 (file)
@@ -1189,7 +1189,7 @@ export abstract class AbstractPool<
       let executeTask = false
       for (const [workerNodeId, workerNode] of workerNodes.entries()) {
         if (
-          this.workerNodes[workerNodeId].usage.tasks.executing <
+          workerNode.usage.tasks.executing <
           (this.opts.tasksQueueOptions?.concurrency as number)
         ) {
           executeTask = true