Added Axios conf
MODIFY
docker/config-standalone.json
docker/config-standalone.json
"replicaSet": "rs0",
"debug": false
},
+ "Axios": {
+ "retries": 0,
+ "timeoutSecs": 30
+ },
"Email": {
"from": "donotreply@charge-angels.fr",
"admins": [

MODIFY
docker/config.json
docker/config.json
"replicaSet": "rs0",
"debug": false
},
+ "Axios": {
+ "retries": 0,
+ "timeoutSecs": 30
+ },
"Email": {
"from": "donotreply@charge-angels.fr",
"admins": [

MODIFY
src/assets/config-template-http.json
src/assets/config-template-http.json
"clientX509CertURL": "",
"databaseURL": ""
},
+ "Axios": {
+ "retries": 0,
+ "timeoutSecs": 30
+ },
"Email": {
"smtp": {
"from": "",

MODIFY
src/assets/config-template-https.json
src/assets/config-template-https.json
"clientX509CertURL": "",
"databaseURL": ""
},
+ "Axios": {
+ "retries": 0,
+ "timeoutSecs": 30
+ },
"Email": {
"smtp": {
"from": "",

MODIFY
src/types/configuration/AxiosConfiguration.ts
src/types/configuration/AxiosConfiguration.ts
export default interface AxiosConfiguration {
retries: number;
- timeout: number;
+ timeoutSecs: number;
}

MODIFY
src/utils/AxiosFactory.ts
src/utils/AxiosFactory.ts
@@ -18,7 +18,7 @@ export default class AxiosFactory {
instanceConfiguration = instanceConfiguration ?? {};
instanceConfiguration.axiosConfig = instanceConfiguration.axiosConfig ?? {} as AxiosRequestConfig;
// Set timeout
- instanceConfiguration.axiosConfig.timeout = instanceConfiguration.axiosConfig.timeout ?? Configuration.getAxiosConfig()?.timeout;
+ instanceConfiguration.axiosConfig.timeout = instanceConfiguration.axiosConfig.timeout ?? Configuration.getAxiosConfig()?.timeoutSecs * 1000;
// Get from map
let axiosInstance = this.axiosInstances.get(tenant.id);
if (!axiosInstance) {

MODIFY
src/utils/Configuration.ts
src/utils/Configuration.ts
@@ -222,8 +222,8 @@ export default class Configuration {
public static getAxiosConfig(): AxiosConfiguration {
const axios = Configuration.getConfig().Axios;
if (!Configuration.isUndefined('Axios', axios)) {
- if (Configuration.isUndefined('Axios.timeout', axios.timeout)) {
- axios.timeout = Constants.AXIOS_DEFAULT_TIMEOUT;
+ if (Configuration.isUndefined('Axios.timeoutSecs', axios.timeoutSecs)) {
+ axios.timeoutSecs = Constants.AXIOS_DEFAULT_TIMEOUT_SECS;
}
if (Configuration.isUndefined('Axios.retries', axios.retries)) {
axios.retries = 0;

MODIFY
src/utils/Constants.ts
src/utils/Constants.ts
@@ -15,9 +15,7 @@ export default class Constants {
public static readonly PERF_MAX_DATA_VOLUME_KB = 512;
public static readonly PERF_MAX_RESPONSE_TIME_MILLIS = 1000;
- public static readonly AXIOS_DEFAULT_TIMEOUT = 60000;
-
- public static readonly LAST_SEEN_UPDATE_INTERVAL_MILLIS = 60000;
+ public static readonly AXIOS_DEFAULT_TIMEOUT_SECS = 30;
public static readonly DC_CHARGING_STATION_DEFAULT_EFFICIENCY_PERCENT = 80;
public static readonly AMPERAGE_DETECTION_THRESHOLD = 0.5;

Added Axios conf