From: Jérôme Benoit Date: Sun, 19 Nov 2023 11:52:20 +0000 (+0100) Subject: refactor: rename constant to a more sensible name X-Git-Tag: v1.2.25~6 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=d81db0817ee9b4c90183da0882a20ff947c915ab;p=e-mobility-charging-stations-simulator.git refactor: rename constant to a more sensible name Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/Bootstrap.ts b/src/charging-station/Bootstrap.ts index 88c516bd..05bd7053 100644 --- a/src/charging-station/Bootstrap.ts +++ b/src/charging-station/Bootstrap.ts @@ -215,11 +215,11 @@ export class Bootstrap extends EventEmitter { return new Promise((resolve, reject) => { const waitTimeout = setTimeout(() => { const message = `Timeout ${formatDurationMilliSeconds( - Constants.STOP_SIMULATOR_TIMEOUT, + Constants.STOP_CHARGING_STATIONS_TIMEOUT, )} reached at stopping charging stations`; console.warn(chalk.yellow(message)); reject(new Error(message)); - }, Constants.STOP_SIMULATOR_TIMEOUT); + }, Constants.STOP_CHARGING_STATIONS_TIMEOUT); waitChargingStationEvents( this, ChargingStationWorkerMessageEvents.stopped, diff --git a/src/utils/Constants.ts b/src/utils/Constants.ts index 2a184016..966fd83a 100644 --- a/src/utils/Constants.ts +++ b/src/utils/Constants.ts @@ -49,7 +49,7 @@ export class Constants { static readonly MAX_RANDOM_INTEGER = 281474976710654; - static readonly STOP_SIMULATOR_TIMEOUT = 120000; // Ms + static readonly STOP_CHARGING_STATIONS_TIMEOUT = 120000; // Ms static readonly EMPTY_FROZEN_OBJECT = Object.freeze({}); static readonly EMPTY_FUNCTION = Object.freeze(() => {