refactor: factor out worker choice strategies options default
[poolifier.git] / src / pools / selection-strategies / abstract-worker-choice-strategy.ts
index 1da5dc52ee69537e5a828a23c74262246867316b..d60d2905674e5b6fc5baa66616a63e9ab9f1fc85 100644 (file)
@@ -1,3 +1,4 @@
+import { DEFAULT_WORKER_CHOICE_STRATEGY_OPTIONS } from '../../utils'
 import type { IPoolInternal } from '../pool-internal'
 import { PoolType } from '../pool-internal'
 import type { IWorker } from '../worker'
@@ -36,7 +37,7 @@ export abstract class AbstractWorkerChoiceStrategy<
    */
   public constructor (
     protected readonly pool: IPoolInternal<Worker, Data, Response>,
-    protected readonly opts: WorkerChoiceStrategyOptions = { medRunTime: false }
+    protected readonly opts: WorkerChoiceStrategyOptions = DEFAULT_WORKER_CHOICE_STRATEGY_OPTIONS
   ) {
     this.checkOptions(this.opts)
     this.isDynamicPool = this.pool.type === PoolType.DYNAMIC