X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fworker%2FWorkerFactory.ts;h=59fbf3a44fe46409a0d84c5a11ed0abcf7fce7f1;hb=d929adcc32a8cc79f0c7182d16f70367b001d28c;hp=ae27d1dfd56fa5e0fd14d4daba074d35afb32c0c;hpb=4a3807d16c54137840a60af41877f3b21de12950;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