docs: refine worker choice strategy documentation
authorJérôme Benoit <jerome.benoit@sap.com>
Sat, 15 Apr 2023 13:15:04 +0000 (15:15 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Sat, 15 Apr 2023 13:15:04 +0000 (15:15 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/pools/pool.ts
src/pools/selection-strategies/worker-choice-strategy-context.ts

index 4115ab5b9a5c7d5d99e1b869ff5340fab42d9c5b..f4a1791504f16964c94f378be5a35b066e0cc0e9 100644 (file)
@@ -84,7 +84,7 @@ export interface PoolOptions<Worker extends IWorker> {
   /**
    * The worker choice strategy to use in this pool.
    *
-   * @defaultValue 'ROUND_ROBIN'
+   * @defaultValue WorkerChoiceStrategies.ROUND_ROBIN
    */
   workerChoiceStrategy?: WorkerChoiceStrategy
   /**
index 5e9f7de9dce24e1510e52d68c09bfb6486df1f52..9a7bb81bd0d83259e9c6b33e86bad7676982eb83 100644 (file)
@@ -40,6 +40,9 @@ export class WorkerChoiceStrategyContext<
    */
   public constructor (
     pool: IPool<Worker, Data, Response>,
+    /**
+     * @defaultValue WorkerChoiceStrategies.ROUND_ROBIN
+     */
     private workerChoiceStrategy: WorkerChoiceStrategy = WorkerChoiceStrategies.ROUND_ROBIN,
     opts: WorkerChoiceStrategyOptions = DEFAULT_WORKER_CHOICE_STRATEGY_OPTIONS
   ) {