}
await this.workerImplementation?.stop();
delete this.workerImplementation;
- this.uiServer?.stop();
+ this.removeAllListeners();
await this.storage?.close();
delete this.storage;
this.resetCounters();
public async restart(stopChargingStations?: boolean): Promise<void> {
await this.stop(stopChargingStations);
+ Configuration.getConfigurationSection<UIServerConfiguration>(ConfigurationSection.uiServer)
+ .enabled === false && this.uiServer?.stop();
await this.start();
}
this.numberOfChargingStations,
)
.then(() => {
- this.removeAllListeners();
resolve('Charging stations stopped');
})
.catch(reject)
? Math.round(this.numberOfChargingStations / (availableParallelism() * 1.5))
: 1;
break;
- case 'single':
+ case 'all':
elementsPerWorker = this.numberOfChargingStations;
break;
}
this.stop()
.then(() => {
console.info(`${chalk.green('Graceful shutdown')}`);
+ this.uiServer?.stop();
// stop() asks for charging stations to stop by default
this.waitChargingStationsStopped()
.then(() => {