From d81db0817ee9b4c90183da0882a20ff947c915ab Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sun, 19 Nov 2023 12:52:20 +0100 Subject: [PATCH] refactor: rename constant to a more sensible name MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/charging-station/Bootstrap.ts | 4 ++-- src/utils/Constants.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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(() => { -- 2.34.1