From: Jérôme Benoit Date: Wed, 20 Mar 2024 20:01:58 +0000 (+0100) Subject: refactor: cleanup variables namespace X-Git-Tag: v1.3.1~21 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=9afcd55e48821caec56007dd8c2bc0381da3ed1f;p=e-mobility-charging-stations-simulator.git refactor: cleanup variables namespace Signed-off-by: Jérôme Benoit --- diff --git a/src/worker/WorkerSet.ts b/src/worker/WorkerSet.ts index ba2b10ad..97414af7 100644 --- a/src/worker/WorkerSet.ts +++ b/src/worker/WorkerSet.ts @@ -107,7 +107,7 @@ export class WorkerSet extends Worke throw new Error('Cannot add a WorkerSet element: not started') } const workerSetElement = await this.getWorkerSetElement() - const waitForAddedWorkerElement = new Promise((resolve, reject) => { + const waitAddedWorkerElement = new Promise((resolve, reject) => { const messageHandler = (message: WorkerMessage): void => { if (message.event === WorkerMessageEvents.addedWorkerElement) { ++workerSetElement.numberOfWorkerElements @@ -125,7 +125,7 @@ export class WorkerSet extends Worke event: WorkerMessageEvents.addWorkerElement, data: elementData }) - const response = await waitForAddedWorkerElement + const response = await waitAddedWorkerElement // Add element sequentially to optimize memory at startup // eslint-disable-next-line @typescript-eslint/no-non-null-assertion if (this.workerOptions.elementAddDelay! > 0) {