X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fworker%2FWorkerFactory.ts;h=59fbf3a44fe46409a0d84c5a11ed0abcf7fce7f1;hb=769d3b106c5e4744487bc633da4e4ee93f8f1bf4;hp=ae27d1dfd56fa5e0fd14d4daba074d35afb32c0c;hpb=2ca0ea909c319b763257cedb8ba421c3f22823fd;p=e-mobility-charging-stations-simulator.git diff --git a/src/worker/WorkerFactory.ts b/src/worker/WorkerFactory.ts index ae27d1df..59fbf3a4 100644 --- a/src/worker/WorkerFactory.ts +++ b/src/worker/WorkerFactory.ts @@ -1,21 +1,12 @@ import { isMainThread } from 'node:worker_threads'; import type { WorkerAbstract } from './WorkerAbstract'; -import { WorkerConstants } from './WorkerConstants'; +import { DEFAULT_WORKER_OPTIONS } from './WorkerConstants'; import { WorkerDynamicPool } from './WorkerDynamicPool'; import { WorkerSet } from './WorkerSet'; import { WorkerStaticPool } from './WorkerStaticPool'; import { type WorkerData, type WorkerOptions, WorkerProcessType } from './WorkerTypes'; -const DEFAULT_WORKER_OPTIONS: WorkerOptions = { - workerStartDelay: WorkerConstants.DEFAULT_WORKER_START_DELAY, - elementStartDelay: WorkerConstants.DEFAULT_ELEMENT_START_DELAY, - poolMinSize: WorkerConstants.DEFAULT_POOL_MIN_SIZE, - poolMaxSize: WorkerConstants.DEFAULT_POOL_MAX_SIZE, - elementsPerWorker: WorkerConstants.DEFAULT_ELEMENTS_PER_WORKER, - poolOptions: {}, -}; - export class WorkerFactory { private constructor() { // This is intentional