From: Jérôme Benoit Date: Fri, 7 Jul 2023 18:00:55 +0000 (+0200) Subject: refactor: cleanups X-Git-Tag: v2.6.10~13 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=bf4ef2cab6fb0dc722f5b5b9deed78c3e27258db;p=poolifier.git refactor: cleanups Signed-off-by: Jérôme Benoit --- diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index 48d0ed9a..d6cbf8f2 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -982,7 +982,7 @@ export abstract class AbstractPool< // Worker started message received const worker = this.getWorkerById(message.workerId as number) if (worker != null) { - this.workerNodes[this.getWorkerNodeKey(worker)].info.started = + this.getWorkerInfo(this.getWorkerNodeKey(worker)).started = message.started as boolean } else { throw new Error( diff --git a/src/pools/worker-node.ts b/src/pools/worker-node.ts index a493b65d..eb2085bc 100644 --- a/src/pools/worker-node.ts +++ b/src/pools/worker-node.ts @@ -70,7 +70,7 @@ implements IWorkerNode { const getTasksQueueSize = (): number => { return this.tasksQueueSize() } - const getTasksMaxQueueSize = (): number => { + const getTasksQueueMaxSize = (): number => { return this.tasksQueueMaxSize() } return { @@ -81,7 +81,7 @@ implements IWorkerNode { return getTasksQueueSize() }, get maxQueued (): number { - return getTasksMaxQueueSize() + return getTasksQueueMaxSize() }, failed: 0 },