refactor: emit worker set info at element started event
authorJérôme Benoit <jerome.benoit@sap.com>
Thu, 20 Jul 2023 20:01:20 +0000 (22:01 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Thu, 20 Jul 2023 20:01:20 +0000 (22:01 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/worker/WorkerSet.ts

index bc1a4c0871547b5485d7ab8c443733741e90d8c3..2514d7239a24dc01baeb98f22c8a492c0f574260 100644 (file)
@@ -119,7 +119,7 @@ export class WorkerSet extends WorkerAbstract<WorkerData> {
     );
     worker.on('message', (message: WorkerMessage<WorkerData>) => {
       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);
       }