X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fworker%2FWorkerFactory.ts;h=2cda0ca2420f3ad4ae49fcfa64dcc55d7b7a261d;hb=9efbac5b97d10f6fd0d8a64f1130c40bdebc7c44;hp=34369e186b06c03c683b4a0ece10c7e898e864b2;hpb=b3cb2b1fe9b7d0832a610dc1ff302d06a1e7d9e8;p=e-mobility-charging-stations-simulator.git diff --git a/src/worker/WorkerFactory.ts b/src/worker/WorkerFactory.ts index 34369e18..2cda0ca2 100644 --- a/src/worker/WorkerFactory.ts +++ b/src/worker/WorkerFactory.ts @@ -20,11 +20,11 @@ export default class WorkerFactory { return new WorkerSet(workerScript, options.elementsPerWorker, options.startDelay); case WorkerProcessType.STATIC_POOL: options.poolMaxSize = options.poolMaxSize ?? 16; - return new WorkerStaticPool(workerScript, options.poolMaxSize, options.startDelay); + return new WorkerStaticPool(workerScript, options.poolMaxSize, options.startDelay, options.poolOptions); case WorkerProcessType.DYNAMIC_POOL: options.poolMinSize = options.poolMinSize ?? 4; options.poolMaxSize = options.poolMaxSize ?? 16; - return new WorkerDynamicPool(workerScript, options.poolMinSize, options.poolMaxSize, options.startDelay); + return new WorkerDynamicPool(workerScript, options.poolMinSize, options.poolMaxSize, options.startDelay, options.poolOptions); default: return null; }