From 1a880eca683648d5228e2424db74553f58ecee7d Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Mon, 28 Aug 2023 05:15:32 +0200 Subject: [PATCH] refactor: cleanup updateTaskStolenStatisticsWorkerUsage() signature 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 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index 5aadac81..a41996ff 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -1230,9 +1230,9 @@ export abstract class AbstractPool< private updateTaskStolenStatisticsWorkerUsage ( workerNodeKey: number, - workerNode: IWorkerNode, taskName: string ): void { + const workerNode = this.workerNodes[workerNodeKey] if (workerNode?.usage != null) { ++workerNode.usage.tasks.stolen } @@ -1276,7 +1276,6 @@ export abstract class AbstractPool< } this.updateTaskStolenStatisticsWorkerUsage( destinationWorkerNodeKey, - destinationWorkerNode, task.name as string ) break @@ -1315,7 +1314,6 @@ export abstract class AbstractPool< } this.updateTaskStolenStatisticsWorkerUsage( workerNodeKey, - workerNode, task.name as string ) } -- 2.34.1