From: Jérôme Benoit Date: Sun, 20 Aug 2023 18:46:30 +0000 (+0200) Subject: refactor: remove unneeded null coalescing X-Git-Tag: v2.6.32~19^2 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=0628755c1a7778e02e362349afcf1567c36a4c4c;p=poolifier.git refactor: remove unneeded null coalescing Signed-off-by: Jérôme Benoit --- diff --git a/.npmrc b/.npmrc deleted file mode 100644 index 22144e56..00000000 --- a/.npmrc +++ /dev/null @@ -1,2 +0,0 @@ -auto-install-peers=true -legacy-peer-deps=true diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index 41e7bb24..1926a4a4 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -879,7 +879,7 @@ export abstract class AbstractPool< const taskFunctionWorkerUsage = this.workerNodes[ workerNodeKey ].getTaskFunctionWorkerUsage( - message.taskPerformance?.name ?? DEFAULT_TASK_NAME + message.taskPerformance?.name as string ) as WorkerUsage this.updateTaskStatisticsWorkerUsage(taskFunctionWorkerUsage, message) this.updateRunTimeWorkerUsage(taskFunctionWorkerUsage, message) diff --git a/src/worker/abstract-worker.ts b/src/worker/abstract-worker.ts index 75a8d784..a00e8f8f 100644 --- a/src/worker/abstract-worker.ts +++ b/src/worker/abstract-worker.ts @@ -496,7 +496,7 @@ export abstract class AbstractWorker< const errorMessage = this.handleError(e as Error | string) this.sendToMainWorker({ taskError: { - name: name ?? DEFAULT_TASK_NAME, + name: name as string, message: errorMessage, data }, @@ -535,7 +535,7 @@ export abstract class AbstractWorker< const errorMessage = this.handleError(e as Error | string) this.sendToMainWorker({ taskError: { - name: name ?? DEFAULT_TASK_NAME, + name: name as string, message: errorMessage, data },