From: Jérôme Benoit Date: Fri, 28 Jul 2023 20:04:06 +0000 (+0200) Subject: fix: fix elementsPerWorker 'auto' computation X-Git-Tag: v1.2.20~106 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=9cfb1e093438268427b17c5e45505acd17730e05;p=e-mobility-charging-stations-simulator.git fix: fix elementsPerWorker 'auto' computation Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/Bootstrap.ts b/src/charging-station/Bootstrap.ts index 16a590a9..6183446d 100644 --- a/src/charging-station/Bootstrap.ts +++ b/src/charging-station/Bootstrap.ts @@ -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 &&