X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fpools%2Fselection-strategies%2Fworker-choice-strategy-context.ts;fp=src%2Fpools%2Fselection-strategies%2Fworker-choice-strategy-context.ts;h=6f15daa0645174b4ce55008dbd46057a40f9c927;hb=d62fc5e18631cc99b49c6792c00dc36fa70339e0;hp=cf1b005169d8fbaa04fb074adb4f3f2966cbe335;hpb=449cd15417158c0d1675a8aec8bcc514ff33b5a3;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 cf1b0051..6f15daa0 100644 --- a/src/pools/selection-strategies/worker-choice-strategy-context.ts +++ b/src/pools/selection-strategies/worker-choice-strategy-context.ts @@ -48,9 +48,7 @@ export class WorkerChoiceStrategyContext< ) { this.opts = { ...getDefaultInternalWorkerChoiceStrategyOptions( - pool.info.maxSize + - Object.keys((this.opts?.weights as Record) ?? {}) - .length + pool.info.maxSize + Object.keys(this.opts?.weights ?? {}).length ), ...this.opts } @@ -237,8 +235,7 @@ export class WorkerChoiceStrategyContext< ): void { this.opts = { ...getDefaultInternalWorkerChoiceStrategyOptions( - pool.info.maxSize + - Object.keys((opts?.weights as Record) ?? {}).length + pool.info.maxSize + Object.keys(opts?.weights ?? {}).length ), ...opts }