import { ChargingStationWorkerData, ChargingStationWorkerMessage, ChargingStationWorkerMessageEvents } from '../types/ChargingStationWorker';
import Configuration from '../utils/Configuration';
import { ChargingStationWorkerData, ChargingStationWorkerMessage, ChargingStationWorkerMessageEvents } from '../types/ChargingStationWorker';
import Configuration from '../utils/Configuration';
import { Storage } from '../performance/storage/Storage';
import { StorageFactory } from '../performance/storage/StorageFactory';
import { Storage } from '../performance/storage/Storage';
import { StorageFactory } from '../performance/storage/StorageFactory';
import UIWebSocketServer from './UIWebSocketServer';
import Utils from '../utils/Utils';
import WorkerAbstract from '../worker/WorkerAbstract';
import UIWebSocketServer from './UIWebSocketServer';
import Utils from '../utils/Utils';
import WorkerAbstract from '../worker/WorkerAbstract';
private readonly uiWebSocketServer!: UIWebSocketServer;
private readonly storage!: Storage;
private numberOfChargingStations: number;
private readonly uiWebSocketServer!: UIWebSocketServer;
private readonly storage!: Storage;
private numberOfChargingStations: number;
}));
Configuration.getPerformanceStorage().enabled && (this.storage = StorageFactory.getStorage(
Configuration.getPerformanceStorage().type,
}));
Configuration.getPerformanceStorage().enabled && (this.storage = StorageFactory.getStorage(
Configuration.getPerformanceStorage().type,
await this.storage?.open();
await this.workerImplementation.start();
this.uiWebSocketServer?.start();
await this.storage?.open();
await this.workerImplementation.start();
this.uiWebSocketServer?.start();
- if (Configuration.getStationTemplateURLs()) {
- for (const stationURL of Configuration.getStationTemplateURLs()) {
+ if (stationTemplateUrls) {
+ for (const stationTemplateUrl of stationTemplateUrls) {
- templateFile: path.join(path.resolve(__dirname, '../'), 'assets', 'station-templates', path.basename(stationURL.file))
+ templateFile: path.join(path.resolve(__dirname, '../'), 'assets', 'station-templates', path.basename(stationTemplateUrl.file))
}
if (this.numberOfChargingStations === 0) {
console.warn(chalk.yellow('No charging station template enabled in configuration, exiting'));
}
if (this.numberOfChargingStations === 0) {
console.warn(chalk.yellow('No charging station template enabled in configuration, exiting'));
},
messageHandler: async (msg: ChargingStationWorkerMessage) => {
if (msg.id === ChargingStationWorkerMessageEvents.STARTED) {
},
messageHandler: async (msg: ChargingStationWorkerMessage) => {
if (msg.id === ChargingStationWorkerMessageEvents.STARTED) {