From: Jérôme Benoit Date: Thu, 20 Jul 2023 20:01:20 +0000 (+0200) Subject: refactor: emit worker set info at element started event X-Git-Tag: v1.2.20~176 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=bdb50f5a32406bfbde8d53d352b37f0a434a1e7f;p=e-mobility-charging-stations-simulator.git refactor: emit worker set info at element started event Signed-off-by: Jérôme Benoit --- diff --git a/src/worker/WorkerSet.ts b/src/worker/WorkerSet.ts index bc1a4c08..2514d723 100644 --- a/src/worker/WorkerSet.ts +++ b/src/worker/WorkerSet.ts @@ -119,7 +119,7 @@ export class WorkerSet extends WorkerAbstract { ); worker.on('message', (message: WorkerMessage) => { if (message.event === WorkerMessageEvents.startedWorkerElement) { - this.emitter?.emit(WorkerSetEvents.elementStarted, message.data); + this.emitter?.emit(WorkerSetEvents.elementStarted, this.info); } else if (message.event === WorkerMessageEvents.startWorkerElementError) { this.emitter?.emit(WorkerSetEvents.elementError, message.data); }