fix: fix elementsPerWorker 'auto' computation
authorJérôme Benoit <jerome.benoit@sap.com>
Fri, 28 Jul 2023 20:04:06 +0000 (22:04 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Fri, 28 Jul 2023 20:04:06 +0000 (22:04 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/Bootstrap.ts

index 16a590a9a493193c9dd7d4ede7789b6f4c8a2cfa..6183446d7d45c4d42a7f3e988dc3c4dbacaf1f45 100644 (file)
@@ -230,7 +230,7 @@ export class Bootstrap extends EventEmitter {
     if (workerConfiguration?.elementsPerWorker === 'auto') {
       elementsPerWorker =
         this.numberOfChargingStations > availableParallelism()
-          ? Math.round(this.numberOfChargingStations / (availableParallelism() * 1.5))
+          ? Math.round((this.numberOfChargingStations / availableParallelism()) * 1.5)
           : 1;
     }
     this.workerImplementation === null &&