From: Jérôme Benoit Date: Tue, 30 May 2023 11:18:13 +0000 (+0200) Subject: refactor: remove unneeded intermediate variable X-Git-Tag: v2.5.0~11 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=37c52a4e7e5056658d9ddd3e8119c2413f669f49;p=poolifier.git refactor: remove unneeded intermediate variable Signed-off-by: Jérôme Benoit --- diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index 4c82ef08..a84161af 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -424,8 +424,8 @@ export abstract class AbstractPool< worker: Worker, message: MessageValue ): void { - const workerNodeKey = this.getWorkerNodeKey(worker) - const workerTasksUsage = this.workerNodes[workerNodeKey].tasksUsage + const workerTasksUsage = + this.workerNodes[this.getWorkerNodeKey(worker)].tasksUsage --workerTasksUsage.running ++workerTasksUsage.run if (message.error != null) {