X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2FChargingStationWorker.ts;h=ff9dbe6286dab402ec6531ca03d05e4792e538e3;hb=769d3b106c5e4744487bc633da4e4ee93f8f1bf4;hp=db7ae2cb4462ff79f50359dc989b50536a73edd6;hpb=2ca0ea909c319b763257cedb8ba421c3f22823fd;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/ChargingStationWorker.ts b/src/charging-station/ChargingStationWorker.ts index db7ae2cb..ff9dbe62 100644 --- a/src/charging-station/ChargingStationWorker.ts +++ b/src/charging-station/ChargingStationWorker.ts @@ -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; if (Configuration.workerPoolInUse()) { chargingStationWorker = new ThreadWorker(startChargingStation, { - maxInactiveTime: WorkerConstants.POOL_MAX_INACTIVE_TIME, + maxInactiveTime: POOL_MAX_INACTIVE_TIME, }); } else { chargingStationWorker = new ChargingStationWorker();