From: Jérôme Benoit Date: Sun, 27 Aug 2023 10:57:51 +0000 (+0200) Subject: fix: revert incorrect change X-Git-Tag: v2.6.37~35 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=241cf15ea44259be2ec66970c3137f99071f4e41;p=poolifier.git fix: revert incorrect change Signed-off-by: Jérôme Benoit --- diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index 2a28893d..2820f8e3 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -1301,7 +1301,11 @@ export abstract class AbstractPool< ...(sourceWorkerNode.popTask() as Task), workerId: workerNode.info.id as number } - if (this.tasksQueueSize(workerNodeKey) === 0) { + if ( + this.tasksQueueSize(workerNodeKey) === 0 && + workerNode.usage.tasks.executing < + (this.opts.tasksQueueOptions?.concurrency as number) + ) { this.executeTask(workerNodeKey, task) } else { this.enqueueTask(workerNodeKey, task)