From: Jérôme Benoit Date: Fri, 21 Jul 2023 19:42:54 +0000 (+0200) Subject: fix: make pool busyness check for worker readiness X-Git-Tag: v2.6.20~2 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=fd7de21a9bf671c81ec09eb01b3f68a4c207b5c6;p=poolifier.git fix: make pool busyness check for worker readiness Signed-off-by: Jérôme Benoit --- diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index fa3406a3..d175cd5b 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -617,9 +617,10 @@ export abstract class AbstractPool< */ protected internalBusy (): boolean { return ( - this.workerNodes.findIndex(workerNode => { - return workerNode.usage.tasks.executing === 0 - }) === -1 + this.workerNodes.findIndex( + workerNode => + workerNode.info.ready && workerNode.usage.tasks.executing === 0 + ) === -1 ) }