From d392bb75a5f44c6d6cbecb17d8dde61c1f7ac8fa Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sun, 24 Jan 2021 20:22:57 +0100 Subject: [PATCH] Fix charging stations counting. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/assets/station-templates/abb-atg.station-template.json | 2 +- src/start.ts | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/assets/station-templates/abb-atg.station-template.json b/src/assets/station-templates/abb-atg.station-template.json index c8297a1c..875eed45 100644 --- a/src/assets/station-templates/abb-atg.station-template.json +++ b/src/assets/station-templates/abb-atg.station-template.json @@ -64,7 +64,7 @@ "probabilityOfStart": 1, "stopAfterHours": 0.3, "stopOnConnectionFailure": false, - "requireAuthorize": false + "requireAuthorize": true }, "Connectors": { "0": {}, diff --git a/src/start.ts b/src/start.ts index 947a1abf..f316d0ad 100644 --- a/src/start.ts +++ b/src/start.ts @@ -30,7 +30,6 @@ class Bootstrap { if (Configuration.useWorkerPool()) { void workerImplementation.addElement(workerData); numConcurrentWorkers = workerImplementation.size; - numStationsTotal = workerImplementation.size; // Start worker sequentially to optimize memory at start time await Utils.sleep(Constants.START_WORKER_DELAY); } else { @@ -41,16 +40,15 @@ class Bootstrap { void workerImplementation.start(); numConcurrentWorkers++; chargingStationsPerWorkerCounter = 1; - numStationsTotal++; // Start worker sequentially to optimize memory at start time await Utils.sleep(Constants.START_WORKER_DELAY); } else { // Add charging station to existing WorkerGroup void workerImplementation.addElement(workerData); chargingStationsPerWorkerCounter++; - numStationsTotal++; } } + numStationsTotal++; } } catch (error) { // eslint-disable-next-line no-console -- 2.34.1