refactor: cleanup import path
[e-mobility-charging-stations-simulator.git] / src / charging-station / ChargingStationWorker.ts
index 4fde42c4d3908a368e2424d3a77cbb3180b0d34c..2623f1272d2f19142715f12bfaadaff469294ddb 100644 (file)
@@ -20,7 +20,7 @@ if (Configuration.workerPoolInUse()) {
   chargingStationWorker = new ThreadWorker<ChargingStationWorkerData>(
     (data?: ChargingStationWorkerData): void => {
       // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, no-new
-      new ChargingStation(data!.index, data!.templateFile)
+      new ChargingStation(data!.index, data!.templateFile, data!.options)
     }
   )
 } else {
@@ -33,7 +33,8 @@ if (Configuration.workerPoolInUse()) {
             try {
               const chargingStation = new ChargingStation(
                 message.data.index,
-                message.data.templateFile
+                message.data.templateFile,
+                message.data.options
               )
               parentPort?.postMessage({
                 event: WorkerMessageEvents.addedWorkerElement,