From: Jérôme Benoit Date: Mon, 28 Aug 2023 03:15:32 +0000 (+0200) Subject: refactor: cleanup updateTaskStolenStatisticsWorkerUsage() signature X-Git-Tag: v2.6.37~18 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=1a880eca683648d5228e2424db74553f58ecee7d;p=poolifier.git refactor: cleanup updateTaskStolenStatisticsWorkerUsage() signature Signed-off-by: Jérôme Benoit --- 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 ) }