X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fpools%2Fselection-strategies%2Fworker-choice-strategy-context.ts;h=5e9f7de9dce24e1510e52d68c09bfb6486df1f52;hb=d01e4d675d7612232edfb9203124deab570b2281;hp=b075c4eac5ae3cd9cd88b41553263b11e2e5af95;hpb=d710242dd39f5dd418b0a89536a9ad88c147fe3b;p=poolifier.git diff --git a/src/pools/selection-strategies/worker-choice-strategy-context.ts b/src/pools/selection-strategies/worker-choice-strategy-context.ts index b075c4ea..5e9f7de9 100644 --- a/src/pools/selection-strategies/worker-choice-strategy-context.ts +++ b/src/pools/selection-strategies/worker-choice-strategy-context.ts @@ -127,4 +127,15 @@ export class WorkerChoiceStrategyContext< ) as IWorkerChoiceStrategy ).remove(workerNodeKey) } + + /** + * Sets the worker choice strategies in the context options. + * + * @param opts - The worker choice strategy options. + */ + public setOptions (opts: WorkerChoiceStrategyOptions): void { + this.workerChoiceStrategies.forEach(workerChoiceStrategy => { + workerChoiceStrategy.setOptions(opts) + }) + } }