X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2FChargingStationWorker.ts;h=c720b21980ae6ad2cf9165054a949c122c27061b;hb=910c3f0cae3d7e9a9fb82608c3a26df37ff19b29;hp=11d7cb0efa238530a321958f9cf7c0deefa3367a;hpb=60a743910478b70e39dcefa5e1b752ec8a93880e;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/ChargingStationWorker.ts b/src/charging-station/ChargingStationWorker.ts index 11d7cb0e..c720b219 100644 --- a/src/charging-station/ChargingStationWorker.ts +++ b/src/charging-station/ChargingStationWorker.ts @@ -1,6 +1,6 @@ // Partial Copyright Jerome Benoit. 2021-2023. All Rights Reserved. -import { parentPort, workerData } from 'worker_threads'; +import { parentPort, workerData } from 'node:worker_threads'; import { ThreadWorker } from 'poolifier'; @@ -29,7 +29,7 @@ if (ChargingStationUtils.workerPoolInUse()) { */ function addMessageListener(): void { parentPort?.on('message', (message: WorkerMessage) => { - if (message.id === WorkerMessageEvents.START_WORKER_ELEMENT) { + if (message.id === WorkerMessageEvents.startWorkerElement) { startChargingStation(message.data); } });