From: Jérôme Benoit Date: Thu, 21 Jan 2021 21:29:06 +0000 (+0100) Subject: Add a default value for workerPoolMaxSize. X-Git-Tag: v1.0.1-0~128 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=955a7d92aacad31127ceb5f9ff7fcc031f3d092d;p=e-mobility-charging-stations-simulator.git Add a default value for workerPoolMaxSize. Signed-off-by: Jérôme Benoit --- diff --git a/src/utils/Configuration.ts b/src/utils/Configuration.ts index f0054ede..8770a9b9 100644 --- a/src/utils/Configuration.ts +++ b/src/utils/Configuration.ts @@ -43,7 +43,7 @@ export default class Configuration { static getWorkerPoolMaxSize(): number { Configuration.deprecateConfigurationKey('workerPoolSize;', 'Use \'workerPoolMaxSize\' instead'); - return Configuration.getConfig().workerPoolMaxSize; + return Configuration.useWorkerPool() && Configuration.objectHasOwnProperty(Configuration.getConfig(), 'workerPoolMaxSize') ? Configuration.getConfig().workerPoolMaxSize : 16; } static getChargingStationsPerWorker(): number {