fix: fix task function statistics tracking
authorJérôme Benoit <jerome.benoit@sap.com>
Sun, 9 Jul 2023 22:43:17 +0000 (00:43 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Sun, 9 Jul 2023 22:43:17 +0000 (00:43 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
CHANGELOG.md
src/pools/abstract-pool.ts

index 02964beb3c29d6bb61916b10f26133bbf7acfdb7..b2d3b81106d5a9ad712bbf738cb04ff853a36131 100644 (file)
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 ## [Unreleased]
 
+### Fixed
+
+- Fix task function statistics tracking.
+
 ## [2.6.13] - 2023-07-10
 
 ### Added
index 056d297273d82057e5a4202ddabd5dffba8c16f1..c200d5317da6ba47c1154cdeb15a9b5ca5c9ee30 100644 (file)
@@ -699,7 +699,7 @@ export abstract class AbstractPool<
     this.updateRunTimeWorkerUsage(workerUsage, message)
     this.updateEluWorkerUsage(workerUsage, message)
     const taskWorkerUsage = this.workerNodes[workerNodeKey].getTaskWorkerUsage(
-      message.name as string
+      message.taskPerformance?.name ?? DEFAULT_TASK_NAME
     ) as WorkerUsage
     this.updateTaskStatisticsWorkerUsage(taskWorkerUsage, message)
     this.updateRunTimeWorkerUsage(taskWorkerUsage, message)