From ac5ee55ef0ad7dc29f3d0bc6906e2e127dc2e026 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Thu, 11 Jul 2024 19:05:38 +0200 Subject: [PATCH] fix: null exception when a task errored 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 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index c009f20a..89a256ae 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -1442,16 +1442,15 @@ export abstract class AbstractPool< } if ( this.shallUpdateTaskFunctionWorkerUsage(workerNodeKey) && + message.taskPerformance?.name != null && this.workerNodes[workerNodeKey].getTaskFunctionWorkerUsage( - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - message.taskPerformance!.name + message.taskPerformance.name ) != null ) { // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const taskFunctionWorkerUsage = this.workerNodes[ workerNodeKey - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - ].getTaskFunctionWorkerUsage(message.taskPerformance!.name)! + ].getTaskFunctionWorkerUsage(message.taskPerformance.name)! updateTaskStatisticsWorkerUsage(taskFunctionWorkerUsage, message) updateRunTimeWorkerUsage( this.workerChoiceStrategiesContext, -- 2.34.1