From: Jérôme Benoit Date: Mon, 5 Feb 2024 12:07:10 +0000 (+0100) Subject: refactor: cleanup charging station events handling code X-Git-Tag: v1.2.35~3 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=e1a3f3c1528a82673d616a96b7b14ba96a664dab;p=e-mobility-charging-stations-simulator.git refactor: cleanup charging station events handling code Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/Bootstrap.ts b/src/charging-station/Bootstrap.ts index 1dcad015..f238d951 100644 --- a/src/charging-station/Bootstrap.ts +++ b/src/charging-station/Bootstrap.ts @@ -351,6 +351,8 @@ export class Bootstrap extends EventEmitter { msg.data as Statistics ) break + case ChargingStationWorkerMessageEvents.addedWorkerElement: + break case ChargingStationWorkerMessageEvents.workerElementError: logger.error( `${this.logPrefix()} ${moduleName}.messageHandler: Error occurred while handling '${(msg.data as ChargingStationWorkerEventError).event}' event on worker:`, @@ -358,8 +360,6 @@ export class Bootstrap extends EventEmitter { ) this.emit(ChargingStationWorkerMessageEvents.workerElementError, msg.data) break - case ChargingStationWorkerMessageEvents.addedWorkerElement: - break default: throw new BaseError( `Unknown charging station worker event: '${