refactor: split WorkerConstants class
[e-mobility-charging-stations-simulator.git] / src / charging-station / ChargingStationWorker.ts
index db7ae2cb4462ff79f50359dc989b50536a73edd6..ff9dbe6286dab402ec6531ca03d05e4792e538e3 100644 (file)
@@ -8,7 +8,7 @@ import { ThreadWorker } from 'poolifier';
 import { ChargingStation } from './ChargingStation';
 import type { ChargingStationWorkerData } from '../types';
 import { Configuration } from '../utils';
-import { WorkerConstants, type WorkerMessage, WorkerMessageEvents } from '../worker';
+import { POOL_MAX_INACTIVE_TIME, type WorkerMessage, WorkerMessageEvents } from '../worker';
 
 const moduleName = 'ChargingStationWorker';
 
@@ -63,7 +63,7 @@ class ChargingStationWorker extends AsyncResource {
 export let chargingStationWorker: ChargingStationWorker | ThreadWorker<ChargingStationWorkerData>;
 if (Configuration.workerPoolInUse()) {
   chargingStationWorker = new ThreadWorker<ChargingStationWorkerData>(startChargingStation, {
-    maxInactiveTime: WorkerConstants.POOL_MAX_INACTIVE_TIME,
+    maxInactiveTime: POOL_MAX_INACTIVE_TIME,
   });
 } else {
   chargingStationWorker = new ChargingStationWorker();