Add a default value for workerPoolMaxSize.
authorJérôme Benoit <jerome.benoit@sap.com>
Thu, 21 Jan 2021 21:29:06 +0000 (22:29 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Thu, 21 Jan 2021 21:29:06 +0000 (22:29 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/utils/Configuration.ts

index f0054edef9f13b67c9404b0ee1685a1fc9a73749..8770a9b9f3ec48cf5859d52b8a2383585a4b8351 100644 (file)
@@ -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 {