X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2FChargingStationWorker.ts;h=2623f1272d2f19142715f12bfaadaff469294ddb;hb=7176985f002d3a50d14a52504d756f16ab60ea19;hp=4eb6e6a0aa8d8a13ed7091e8255f35029ed62fce;hpb=244c1396e337032577839fa13e9191d5e943864f;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/ChargingStationWorker.ts b/src/charging-station/ChargingStationWorker.ts index 4eb6e6a0..2623f127 100644 --- a/src/charging-station/ChargingStationWorker.ts +++ b/src/charging-station/ChargingStationWorker.ts @@ -19,8 +19,8 @@ export let chargingStationWorker: object if (Configuration.workerPoolInUse()) { chargingStationWorker = new ThreadWorker( (data?: ChargingStationWorkerData): void => { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - new ChargingStation(data!.index, data!.templateFile).add() + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, no-new + new ChargingStation(data!.index, data!.templateFile, data!.options) } ) } else { @@ -33,9 +33,9 @@ if (Configuration.workerPoolInUse()) { try { const chargingStation = new ChargingStation( message.data.index, - message.data.templateFile + message.data.templateFile, + message.data.options ) - chargingStation.add() parentPort?.postMessage({ event: WorkerMessageEvents.addedWorkerElement, data: buildChargingStationDataPayload(chargingStation)