From: Jérôme Benoit Date: Sun, 31 Dec 2023 14:02:49 +0000 (+0100) Subject: refactor: dedupe worker choice strategy options handling code X-Git-Tag: v3.1.14~6 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=ce63d9e2f3d895bd2ae5aafc40769ff4dda3c887;p=poolifier.git refactor: dedupe worker choice strategy options handling code 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 234eada7..d8d8f32d 100644 --- a/src/pools/selection-strategies/abstract-worker-choice-strategy.ts +++ b/src/pools/selection-strategies/abstract-worker-choice-strategy.ts @@ -57,11 +57,7 @@ export abstract class AbstractWorkerChoiceStrategy< protected readonly pool: IPool, protected opts?: WorkerChoiceStrategyOptions ) { - this.opts = buildWorkerChoiceStrategyOptions( - this.pool, - this.opts - ) - this.setTaskStatisticsRequirements(this.opts) + this.setOptions(this.opts) this.choose = this.choose.bind(this) }