X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Futils%2FConfiguration.ts;h=b564cd6252ea4366993f24bb5e9961132bd9ad4d;hb=3fb26594ef01e3f443bcc0bbf81401c6e38fdc01;hp=f01deceaf24836c2266020e9e8339991f08f5497;hpb=81b9a105a722ddb59ceaec77f9131695d80be495;p=e-mobility-charging-stations-simulator.git diff --git a/src/utils/Configuration.ts b/src/utils/Configuration.ts index f01decea..b564cd62 100644 --- a/src/utils/Configuration.ts +++ b/src/utils/Configuration.ts @@ -20,7 +20,13 @@ import { type UIServerConfiguration, type WorkerConfiguration, } from '../types'; -import { WorkerConstants, WorkerProcessType } from '../worker'; +import { + DEFAULT_ELEMENT_START_DELAY, + DEFAULT_POOL_MAX_SIZE, + DEFAULT_POOL_MIN_SIZE, + DEFAULT_WORKER_START_DELAY, + WorkerProcessType, +} from '../worker'; type ConfigurationSectionType = | LogConfiguration @@ -401,11 +407,11 @@ export class Configuration { ); const defaultWorkerConfiguration: WorkerConfiguration = { processType: WorkerProcessType.workerSet, - startDelay: WorkerConstants.DEFAULT_WORKER_START_DELAY, + startDelay: DEFAULT_WORKER_START_DELAY, elementsPerWorker: 'auto', - elementStartDelay: WorkerConstants.DEFAULT_ELEMENT_START_DELAY, - poolMinSize: WorkerConstants.DEFAULT_POOL_MIN_SIZE, - poolMaxSize: WorkerConstants.DEFAULT_POOL_MAX_SIZE, + elementStartDelay: DEFAULT_ELEMENT_START_DELAY, + poolMinSize: DEFAULT_POOL_MIN_SIZE, + poolMaxSize: DEFAULT_POOL_MAX_SIZE, }; hasOwnProp(Configuration.getConfigurationData(), 'workerPoolStrategy') && delete Configuration.getConfigurationData()?.workerPoolStrategy; @@ -572,7 +578,7 @@ export class Configuration { `${Constants.DEFAULT_PERFORMANCE_DIRECTORY}/${Constants.DEFAULT_PERFORMANCE_RECORDS_DB_NAME}.db`, ); default: - throw new Error(`Performance storage URI is mandatory with storage type '${storageType}'`); + throw new Error(`Unsupported storage type '${storageType}'`); } }