From eb8afc8aca35901acd45efb54f41e157c098f23e Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sun, 9 Jul 2023 23:41:49 +0200 Subject: [PATCH] refactor: cleanups to variable namespace MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/pools/abstract-pool.ts | 14 +++++++------- src/pools/worker-node.ts | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index 026bf918..056d2972 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -675,11 +675,11 @@ export abstract class AbstractPool< const workerUsage = this.workerNodes[workerNodeKey].usage ++workerUsage.tasks.executing this.updateWaitTimeWorkerUsage(workerUsage, task) - const tasksWorkerUsage = this.workerNodes[workerNodeKey].getTaskWorkerUsage( + const taskWorkerUsage = this.workerNodes[workerNodeKey].getTaskWorkerUsage( task.name as string ) as WorkerUsage - ++tasksWorkerUsage.tasks.executing - this.updateWaitTimeWorkerUsage(tasksWorkerUsage, task) + ++taskWorkerUsage.tasks.executing + this.updateWaitTimeWorkerUsage(taskWorkerUsage, task) } /** @@ -698,12 +698,12 @@ export abstract class AbstractPool< this.updateTaskStatisticsWorkerUsage(workerUsage, message) this.updateRunTimeWorkerUsage(workerUsage, message) this.updateEluWorkerUsage(workerUsage, message) - const tasksWorkerUsage = this.workerNodes[workerNodeKey].getTaskWorkerUsage( + const taskWorkerUsage = this.workerNodes[workerNodeKey].getTaskWorkerUsage( message.name as string ) as WorkerUsage - this.updateTaskStatisticsWorkerUsage(tasksWorkerUsage, message) - this.updateRunTimeWorkerUsage(tasksWorkerUsage, message) - this.updateEluWorkerUsage(tasksWorkerUsage, message) + this.updateTaskStatisticsWorkerUsage(taskWorkerUsage, message) + this.updateRunTimeWorkerUsage(taskWorkerUsage, message) + this.updateEluWorkerUsage(taskWorkerUsage, message) } private updateTaskStatisticsWorkerUsage ( diff --git a/src/pools/worker-node.ts b/src/pools/worker-node.ts index 5c172d8a..76169c89 100644 --- a/src/pools/worker-node.ts +++ b/src/pools/worker-node.ts @@ -44,7 +44,7 @@ implements IWorkerNode { } /** - * Worker node tasks queue maximum size. + * Tasks queue maximum size. * * @returns The tasks queue maximum size. */ -- 2.34.1