- * @param workerChoiceStrategy - The worker choice strategy.
- * @returns The worker choice strategy instance for the pool type.
- */
- private getPoolWorkerChoiceStrategy (
- workerChoiceStrategy: WorkerChoiceStrategy = WorkerChoiceStrategies.ROUND_ROBIN
- ): IWorkerChoiceStrategy<Worker> {
- if (this.pool.type === PoolType.DYNAMIC) {
- return new DynamicPoolWorkerChoiceStrategy(
- this.pool,
- this.createDynamicallyWorkerCallback,
- workerChoiceStrategy
- )
- }
- return getWorkerChoiceStrategy(this.pool, workerChoiceStrategy)
- }
-
- /**
- * Gets the worker choice strategy used in the context.
- *
- * @returns The worker choice strategy.