refactor: improve error logging
[e-mobility-charging-stations-simulator.git] / src / charging-station / ChargingStationUtils.ts
index d8f67c21460b626875d01be4bae961e93d1c3b78..e76b3a6e0bb357eca59cb59f689f4c7b191bc87c 100644 (file)
@@ -5,7 +5,7 @@ import { fileURLToPath } from 'node:url';
 import chalk from 'chalk';
 import moment from 'moment';
 
-import type { ChargingStation } from './internal';
+import type { ChargingStation } from './ChargingStation';
 import { BaseError } from '../exception';
 import {
   AmpereUnits,
@@ -29,15 +29,7 @@ import {
   RecurrencyKindType,
   Voltage,
 } from '../types';
-import {
-  ACElectricUtils,
-  Configuration,
-  Constants,
-  DCElectricUtils,
-  Utils,
-  logger,
-} from '../utils';
-import { WorkerProcessType } from '../worker';
+import { ACElectricUtils, Constants, DCElectricUtils, Utils, logger } from '../utils';
 
 const moduleName = 'ChargingStationUtils';
 
@@ -351,16 +343,6 @@ export class ChargingStationUtils {
     }
   }
 
-  public static workerPoolInUse(): boolean {
-    return [WorkerProcessType.dynamicPool, WorkerProcessType.staticPool].includes(
-      Configuration.getWorker().processType
-    );
-  }
-
-  public static workerDynamicPoolInUse(): boolean {
-    return Configuration.getWorker().processType === WorkerProcessType.dynamicPool;
-  }
-
   public static warnTemplateKeysDeprecation(
     stationTemplate: ChargingStationTemplate,
     logPrefix: string,
@@ -550,7 +532,7 @@ export class ChargingStationUtils {
     return (
       stationInfo.idTagsFile &&
       path.join(
-        path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../'),
+        path.dirname(fileURLToPath(import.meta.url)),
         'assets',
         path.basename(stationInfo.idTagsFile)
       )