refactor: cleanups to variable namespace
authorJérôme Benoit <jerome.benoit@sap.com>
Sun, 9 Jul 2023 21:41:49 +0000 (23:41 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Sun, 9 Jul 2023 21:41:49 +0000 (23:41 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/pools/abstract-pool.ts
src/pools/worker-node.ts

index 026bf918a40ce0158c3c159cd7734a6919f6e9c7..056d297273d82057e5a4202ddabd5dffba8c16f1 100644 (file)
@@ -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 (
index 5c172d8aad3916e96e44b6424d0526ad0d31afdb..76169c8988b28a7621a716decb96fb9771fbfe67 100644 (file)
@@ -44,7 +44,7 @@ implements IWorkerNode<Worker, Data> {
   }
 
   /**
-   * Worker node tasks queue maximum size.
+   * Tasks queue maximum size.
    *
    * @returns The tasks queue maximum size.
    */