X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2FChargingStation.ts;h=e9420089086639754f86c687007b1aa420e216a8;hb=c8eeb62b00988601b40e599745329acb67197750;hp=4fc275bcdc7cc0b5f5206b5d731748b525d30f9f;hpb=7874b0b1fbf94d34e8c65ed3e669f1c97f74dd1d;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index 4fc275bc..e9420089 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -992,13 +992,17 @@ export default class ChargingStation { logger.debug(this.logPrefix() + ' Template file ' + this.stationTemplateFile + ' have changed, reload'); // Initialize this.initialize(); - // Stop the ATG + // Restart the ATG if (!this.stationInfo.AutomaticTransactionGenerator.enable && this.automaticTransactionGeneration) { await this.automaticTransactionGeneration.stop(); } - // Start the ATG this.startAutomaticTransactionGenerator(); + if (this.getEnableStatistics()) { + this.performanceStatistics.restart(); + } else { + this.performanceStatistics.stop(); + } // FIXME?: restart heartbeat and WebSocket ping when their interval values have changed } catch (error) { logger.error(this.logPrefix() + ' Charging station template file monitoring error: %j', error);