From: Jérôme Benoit Date: Sat, 24 Jun 2023 18:45:01 +0000 (+0200) Subject: refactor: cleanup worker choice strategy options handling X-Git-Tag: v2.6.4~38 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=65ab8dcc71797783b49b913e0eda4964c6300751;p=poolifier.git refactor: cleanup worker choice strategy options handling Signed-off-by: Jérôme Benoit --- diff --git a/src/pools/selection-strategies/abstract-worker-choice-strategy.ts b/src/pools/selection-strategies/abstract-worker-choice-strategy.ts index 476c58bc..121647b6 100644 --- a/src/pools/selection-strategies/abstract-worker-choice-strategy.ts +++ b/src/pools/selection-strategies/abstract-worker-choice-strategy.ts @@ -133,9 +133,8 @@ export abstract class AbstractWorkerChoiceStrategy< /** @inheritDoc */ public setOptions (opts: WorkerChoiceStrategyOptions): void { - opts = opts ?? DEFAULT_WORKER_CHOICE_STRATEGY_OPTIONS - this.setTaskStatisticsRequirements(opts) - this.opts = opts + this.opts = opts ?? DEFAULT_WORKER_CHOICE_STRATEGY_OPTIONS + this.setTaskStatisticsRequirements(this.opts) } // /**