X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Futils%2FConfiguration.ts;h=0c5a356ac18cd35a0e9e201b3f910bed3f6ce5b2;hb=8ba32434313f1f5e22c76c3adf46ec68874e0a9e;hp=6b8023ab0b2911cb7bf54ef38d21aaaddcfb0c67;hpb=6501eda9e69fff639911308b3f2de26593ae18c9;p=e-mobility-charging-stations-simulator.git diff --git a/src/utils/Configuration.ts b/src/utils/Configuration.ts index 6b8023ab..0c5a356a 100644 --- a/src/utils/Configuration.ts +++ b/src/utils/Configuration.ts @@ -104,7 +104,7 @@ export class Configuration { } public static workerPoolInUse(): boolean { - return [WorkerProcessType.dynamicPool, WorkerProcessType.staticPool].includes( + return [WorkerProcessType.dynamicPool, WorkerProcessType.fixedPool].includes( Configuration.getConfigurationSection(ConfigurationSection.worker) .processType!, ); @@ -385,17 +385,17 @@ export class Configuration { `Use '${ConfigurationSection.worker}' section to define the worker pool minimum size instead`, ); Configuration.warnDeprecatedConfigurationKey( - 'workerPoolSize;', + 'workerPoolSize', undefined, `Use '${ConfigurationSection.worker}' section to define the worker pool maximum size instead`, ); Configuration.warnDeprecatedConfigurationKey( - 'workerPoolMaxSize;', + 'workerPoolMaxSize', undefined, `Use '${ConfigurationSection.worker}' section to define the worker pool maximum size instead`, ); Configuration.warnDeprecatedConfigurationKey( - 'workerPoolStrategy;', + 'workerPoolStrategy', undefined, `Use '${ConfigurationSection.worker}' section to define the worker pool strategy instead`, ); @@ -404,6 +404,16 @@ export class Configuration { ConfigurationSection.worker, 'Not publicly exposed to end users', ); + if ( + Configuration.getConfigurationData()?.worker?.processType === + ('staticPool' as WorkerProcessType) + ) { + console.error( + `${chalk.green(Configuration.logPrefix())} ${chalk.red( + `Deprecated configuration 'staticPool' value usage in worker section 'processType' field. Use '${WorkerProcessType.fixedPool}' value instead`, + )}`, + ); + } // log section Configuration.warnDeprecatedConfigurationKey( 'logEnabled',