'charging-station',
`ChargingStationWorker${path.extname(fileURLToPath(import.meta.url))}`
);
- this.initialize();
+ this.initializeCounters();
Configuration.getUIServer().enabled === true &&
(this.uiServer = UIServerFactory.getUIServerImplementation(Configuration.getUIServer()));
Configuration.getPerformanceStorage().enabled === true &&
// Enable unconditionally for now
this.logUnhandledRejection();
this.logUncaughtException();
- this.initialize();
+ this.initializeCounters();
+ this.initializeWorkerImplementation();
await this.storage?.open();
await this.workerImplementation?.start();
this.uiServer?.start();
public async restart(): Promise<void> {
await this.stop();
- this.initialize();
+ this.initializeCounters();
+ this.initializeWorkerImplementation();
await this.start();
}
this.storage.storePerformanceStatistics(data) as void;
};
- private initialize() {
+ private initializeCounters() {
this.numberOfChargingStationTemplates = 0;
this.numberOfChargingStations = 0;
const stationTemplateUrls = Configuration.getStationTemplateUrls();
process.exit(exitCodes.noChargingStationTemplates);
}
this.numberOfStartedChargingStations = 0;
- this.initializeWorkerImplementation();
}
private logUncaughtException(): void {