refactor: cleanups
authorJérôme Benoit <jerome.benoit@sap.com>
Fri, 7 Jul 2023 18:00:55 +0000 (20:00 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Fri, 7 Jul 2023 18:00:55 +0000 (20:00 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/pools/abstract-pool.ts
src/pools/worker-node.ts

index 48d0ed9afed3cd9071aaf1e854f598f4118810e1..d6cbf8f21b40bcafbfdc1ef4e16db22cfa5ae1bb 100644 (file)
@@ -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(
index a493b65ded97c3651076a21a244fd41fe3ce8620..eb2085bca21eeac3b7f225475c71d15abb75a28f 100644 (file)
@@ -70,7 +70,7 @@ implements IWorkerNode<Worker, Data> {
     const getTasksQueueSize = (): number => {
       return this.tasksQueueSize()
     }
-    const getTasksMaxQueueSize = (): number => {
+    const getTasksQueueMaxSize = (): number => {
       return this.tasksQueueMaxSize()
     }
     return {
@@ -81,7 +81,7 @@ implements IWorkerNode<Worker, Data> {
           return getTasksQueueSize()
         },
         get maxQueued (): number {
-          return getTasksMaxQueueSize()
+          return getTasksQueueMaxSize()
         },
         failed: 0
       },