X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fpools%2Fselection-strategies%2Finterleaved-weighted-round-robin-worker-choice-strategy.ts;h=c45d6e0bf606f07a0ce792a5f68c2fbe017e2208;hb=refs%2Ftags%2Fv2.6.29;hp=907bd911d6e607966bfddc2cd02087c11cdab44f;hpb=3d6dd312a7825521cce506ebb7443bae36a111e6;p=poolifier.git diff --git a/src/pools/selection-strategies/interleaved-weighted-round-robin-worker-choice-strategy.ts b/src/pools/selection-strategies/interleaved-weighted-round-robin-worker-choice-strategy.ts index 907bd911..c45d6e0b 100644 --- a/src/pools/selection-strategies/interleaved-weighted-round-robin-worker-choice-strategy.ts +++ b/src/pools/selection-strategies/interleaved-weighted-round-robin-worker-choice-strategy.ts @@ -80,8 +80,10 @@ export class InterleavedWeightedRoundRobinWorkerChoiceStrategy< ) { const workerWeight = this.opts.weights?.[workerNodeKey] ?? this.defaultWorkerWeight - // if (this.isWorkerNodeReady(workerNodeKey) && workerWeight >= this.roundWeights[roundIndex]) { - if (workerWeight >= this.roundWeights[roundIndex]) { + if ( + this.isWorkerNodeEligible(workerNodeKey) && + workerWeight >= this.roundWeights[roundIndex] + ) { roundId = roundIndex workerNodeId = workerNodeKey break