+ Configuration.getConfigurationData()?.log)
+ }
+ return logConfiguration
+ }
+
+ private static buildWorkerSection (): WorkerConfiguration {
+ const defaultWorkerConfiguration: WorkerConfiguration = {
+ processType: WorkerProcessType.workerSet,
+ startDelay: DEFAULT_WORKER_START_DELAY,
+ elementsPerWorker: 'auto',
+ elementStartDelay: DEFAULT_ELEMENT_START_DELAY,
+ poolMinSize: DEFAULT_POOL_MIN_SIZE,
+ poolMaxSize: DEFAULT_POOL_MAX_SIZE
+ }
+ const deprecatedWorkerConfiguration: WorkerConfiguration = {
+ ...(hasOwnProp(Configuration.getConfigurationData(), 'workerProcess') && {
+ processType: Configuration.getConfigurationData()?.workerProcess
+ }),
+ ...(hasOwnProp(Configuration.getConfigurationData(), 'workerStartDelay') && {
+ startDelay: Configuration.getConfigurationData()?.workerStartDelay
+ }),
+ ...(hasOwnProp(Configuration.getConfigurationData(), 'chargingStationsPerWorker') && {
+ elementsPerWorker: Configuration.getConfigurationData()?.chargingStationsPerWorker
+ }),
+ ...(hasOwnProp(Configuration.getConfigurationData(), 'elementStartDelay') && {
+ elementStartDelay: Configuration.getConfigurationData()?.elementStartDelay
+ }),
+ ...(hasOwnProp(Configuration.getConfigurationData(), 'workerPoolMinSize') && {
+ poolMinSize: Configuration.getConfigurationData()?.workerPoolMinSize
+ }),
+ ...(hasOwnProp(Configuration.getConfigurationData(), 'workerPoolMaxSize') && {
+ poolMaxSize: Configuration.getConfigurationData()?.workerPoolMaxSize
+ })
+ }
+ hasOwnProp(Configuration.getConfigurationData(), 'workerPoolStrategy') &&
+ delete Configuration.getConfigurationData()?.workerPoolStrategy
+ const workerConfiguration: WorkerConfiguration = {
+ ...defaultWorkerConfiguration,
+ ...deprecatedWorkerConfiguration,
+ ...(hasOwnProp(Configuration.getConfigurationData(), ConfigurationSection.worker) &&
+ Configuration.getConfigurationData()?.worker)
+ }
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+ checkWorkerProcessType(workerConfiguration.processType!)
+ checkWorkerElementsPerWorker(workerConfiguration.elementsPerWorker)
+ return workerConfiguration