From: Jérôme Benoit Date: Sun, 9 Jul 2023 21:41:49 +0000 (+0200) Subject: refactor: cleanups to variable namespace X-Git-Tag: v2.6.13~3 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=eb8afc8aca35901acd45efb54f41e157c098f23e;p=poolifier.git refactor: cleanups to variable namespace Signed-off-by: Jérôme Benoit --- 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. */