X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2FChargingStationWorker.ts;h=6201bf07e2b52fe7e6d1931412da74e89043717c;hb=248f70eff6b955b177f0bbd9ca84356c3b99d72e;hp=7c7a523558bd6e9b547afe8775ec71c79f11187b;hpb=a60809049f58eb001d868717a1dda9ac129f8a53;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/ChargingStationWorker.ts b/src/charging-station/ChargingStationWorker.ts index 7c7a5235..6201bf07 100644 --- a/src/charging-station/ChargingStationWorker.ts +++ b/src/charging-station/ChargingStationWorker.ts @@ -9,7 +9,7 @@ import { ChargingStation } from './ChargingStation'; import { BaseError } from '../exception'; import type { ChargingStationWorkerData } from '../types'; import { Configuration } from '../utils'; -import { POOL_MAX_INACTIVE_TIME, type WorkerMessage, WorkerMessageEvents } from '../worker'; +import { type WorkerMessage, WorkerMessageEvents } from '../worker'; const moduleName = 'ChargingStationWorker'; @@ -52,7 +52,7 @@ class ChargingStationWorker extends AsyncResource { throw new BaseError( `Unknown worker event: '${message.event}' received with data: '${JSON.stringify( message.data, - null, + undefined, 2, )}'`, ); @@ -63,9 +63,7 @@ class ChargingStationWorker extends AsyncResource { export let chargingStationWorker: ChargingStationWorker | ThreadWorker; if (Configuration.workerPoolInUse()) { - chargingStationWorker = new ThreadWorker(startChargingStation, { - maxInactiveTime: POOL_MAX_INACTIVE_TIME, - }); + chargingStationWorker = new ThreadWorker(startChargingStation); } else { chargingStationWorker = new ChargingStationWorker(); }