fix: ensure worker choice is retried at least the pool max size
[poolifier.git] / src / pools / selection-strategies / round-robin-worker-choice-strategy.ts
index 7c49cec75689a8ca64aa101b51ec8f86890f1409..2d08cff20621ba564bb0b424c32a4bcd904f53bb 100644 (file)
@@ -1,10 +1,9 @@
-import { DEFAULT_WORKER_CHOICE_STRATEGY_OPTIONS } from '../../utils'
 import type { IPool } from '../pool'
 import type { IWorker } from '../worker'
 import { AbstractWorkerChoiceStrategy } from './abstract-worker-choice-strategy'
 import type {
   IWorkerChoiceStrategy,
-  WorkerChoiceStrategyOptions
+  InternalWorkerChoiceStrategyOptions
 } from './selection-strategies-types'
 
 /**
@@ -24,10 +23,9 @@ export class RoundRobinWorkerChoiceStrategy<
   /** @inheritDoc */
   public constructor (
     pool: IPool<Worker, Data, Response>,
-    opts: WorkerChoiceStrategyOptions = DEFAULT_WORKER_CHOICE_STRATEGY_OPTIONS
+    opts: InternalWorkerChoiceStrategyOptions
   ) {
     super(pool, opts)
-    this.setTaskStatisticsRequirements(this.opts)
   }
 
   /** @inheritDoc */