Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
private constructor() {
this.started = false;
this.workerScript = path.join(path.resolve(__dirname, '../'), 'charging-station', 'StationWorker.js');
- Configuration.setConfigurationChangeCallback(async () => this.restart());
+ Configuration.setConfigurationChangeCallback(async () => await Bootstrap.getInstance().restart());
}
public static getInstance(): Bootstrap {
if (!Utils.isEmptyArray(this.getConnector(connectorId).chargingProfiles)) {
this.getConnector(connectorId).chargingProfiles?.forEach((chargingProfile: ChargingProfile, index: number) => {
if (chargingProfile.chargingProfileId === cp.chargingProfileId
- || (chargingProfile.stackLevel === cp.stackLevel && chargingProfile.chargingProfilePurpose === cp.chargingProfilePurpose)) {
+ || (chargingProfile.stackLevel === cp.stackLevel && chargingProfile.chargingProfilePurpose === cp.chargingProfilePurpose)) {
this.getConnector(connectorId).chargingProfiles[index] = cp;
return true;
}