From: Jérôme Benoit Date: Sat, 15 Apr 2023 13:15:04 +0000 (+0200) Subject: docs: refine worker choice strategy documentation X-Git-Tag: v2.4.9~5 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=95ec6006ca39aef0102c82ca42e104a4e9b40b6b;p=poolifier.git docs: refine worker choice strategy documentation Signed-off-by: Jérôme Benoit --- diff --git a/src/pools/pool.ts b/src/pools/pool.ts index 4115ab5b..f4a17915 100644 --- a/src/pools/pool.ts +++ b/src/pools/pool.ts @@ -84,7 +84,7 @@ export interface PoolOptions { /** * The worker choice strategy to use in this pool. * - * @defaultValue 'ROUND_ROBIN' + * @defaultValue WorkerChoiceStrategies.ROUND_ROBIN */ workerChoiceStrategy?: WorkerChoiceStrategy /** diff --git a/src/pools/selection-strategies/worker-choice-strategy-context.ts b/src/pools/selection-strategies/worker-choice-strategy-context.ts index 5e9f7de9..9a7bb81b 100644 --- a/src/pools/selection-strategies/worker-choice-strategy-context.ts +++ b/src/pools/selection-strategies/worker-choice-strategy-context.ts @@ -40,6 +40,9 @@ export class WorkerChoiceStrategyContext< */ public constructor ( pool: IPool, + /** + * @defaultValue WorkerChoiceStrategies.ROUND_ROBIN + */ private workerChoiceStrategy: WorkerChoiceStrategy = WorkerChoiceStrategies.ROUND_ROBIN, opts: WorkerChoiceStrategyOptions = DEFAULT_WORKER_CHOICE_STRATEGY_OPTIONS ) {