X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2FChargingStationWorker.ts;h=81e0296d8761eca012b63085553df13615b14980;hb=2a2d9bba858b5368b3fefa1fc4ae9e5d6ce44a20;hp=20a812e496a78f1f128b88a2f33df652ab04ee74;hpb=07f350040f34e6727c548bc645e9982c189cd4ef;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/ChargingStationWorker.ts b/src/charging-station/ChargingStationWorker.ts index 20a812e4..81e0296d 100644 --- a/src/charging-station/ChargingStationWorker.ts +++ b/src/charging-station/ChargingStationWorker.ts @@ -1,6 +1,6 @@ // Partial Copyright Jerome Benoit. 2021. All Rights Reserved. -import { ChargingStationWorkerData, WorkerEvents, WorkerMessage } from '../types/Worker'; +import { ChargingStationWorkerData, WorkerMessage, WorkerMessageEvents } from '../types/Worker'; import { parentPort, workerData } from 'worker_threads'; import ChargingStation from './ChargingStation'; @@ -25,7 +25,7 @@ if (Utils.workerPoolInUse()) { */ function addMessageListener(): void { parentPort?.on('message', (message: WorkerMessage) => { - if (message.id === WorkerEvents.START_WORKER_ELEMENT) { + if (message.id === WorkerMessageEvents.START_WORKER_ELEMENT) { startChargingStation(message.data); } });