X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fworker%2FWorkerConstants.ts;h=ded5c89142f8e2aa9f485ed9df6ea476a7832100;hb=626d3ce5e6dfdc848cb2bb5833044fe6fbe68324;hp=404840954ddd702c32207853695764fe5379404a;hpb=66a7748ddeda8c94d7562a1ce58d440319654a4c;p=e-mobility-charging-stations-simulator.git diff --git a/src/worker/WorkerConstants.ts b/src/worker/WorkerConstants.ts index 40484095..ded5c891 100644 --- a/src/worker/WorkerConstants.ts +++ b/src/worker/WorkerConstants.ts @@ -9,7 +9,7 @@ export const EMPTY_FUNCTION = Object.freeze(() => { export const workerSetVersion = '1.0.1' -export const DEFAULT_ELEMENT_START_DELAY = 0 +export const DEFAULT_ELEMENT_ADD_DELAY = 0 export const DEFAULT_WORKER_START_DELAY = 500 export const DEFAULT_POOL_MIN_SIZE = Math.floor(availableParallelism() / 2) export const DEFAULT_POOL_MAX_SIZE = Math.round(availableParallelism() * 1.5) @@ -17,11 +17,12 @@ export const DEFAULT_ELEMENTS_PER_WORKER = 1 export const DEFAULT_WORKER_OPTIONS: WorkerOptions = Object.freeze({ workerStartDelay: DEFAULT_WORKER_START_DELAY, - elementStartDelay: DEFAULT_ELEMENT_START_DELAY, + elementAddDelay: DEFAULT_ELEMENT_ADD_DELAY, poolMinSize: DEFAULT_POOL_MIN_SIZE, poolMaxSize: DEFAULT_POOL_MAX_SIZE, elementsPerWorker: DEFAULT_ELEMENTS_PER_WORKER, poolOptions: { + startWorkers: false, enableEvents: true, restartWorkerOnError: true, errorHandler: defaultErrorHandler,