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';
export let chargingStationWorker: ChargingStationWorker | ThreadWorker<ChargingStationWorkerData>;
if (Configuration.workerPoolInUse()) {
- chargingStationWorker = new ThreadWorker<ChargingStationWorkerData>(startChargingStation, {
- maxInactiveTime: POOL_MAX_INACTIVE_TIME,
- });
+ chargingStationWorker = new ThreadWorker<ChargingStationWorkerData>(startChargingStation);
} else {
chargingStationWorker = new ChargingStationWorker();
}
export const DEFAULT_ELEMENT_START_DELAY = 0;
export const DEFAULT_WORKER_START_DELAY = 500;
-export const POOL_MAX_INACTIVE_TIME = 60000;
export const DEFAULT_POOL_MIN_SIZE = Math.floor(availableParallelism() / 2);
export const DEFAULT_POOL_MAX_SIZE = Math.round(availableParallelism() * 1.5);
export const DEFAULT_ELEMENTS_PER_WORKER = 1;
DEFAULT_POOL_MAX_SIZE,
DEFAULT_POOL_MIN_SIZE,
DEFAULT_WORKER_START_DELAY,
- POOL_MAX_INACTIVE_TIME,
} from './WorkerConstants';
export { WorkerFactory } from './WorkerFactory';
export {