repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refactor: methods namepace cleanup
[poolifier.git]
/
src
/
pools
/
selection-strategies
/
interleaved-weighted-round-robin-worker-choice-strategy.ts
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 78960f1063c81f1c616d8fb9b868061cdc6598c5..26f9d909eed84f448e0244042d23dc289a26b96a 100644
(file)
--- 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,7
+80,10
@@
export class InterleavedWeightedRoundRobinWorkerChoiceStrategy<
) {
const workerWeight =
this.opts.weights?.[workerNodeKey] ?? this.defaultWorkerWeight
) {
const workerWeight =
this.opts.weights?.[workerNodeKey] ?? this.defaultWorkerWeight
- if (workerWeight >= this.roundWeights[roundIndex]) {
+ if (
+ this.isWorkerNodeReady(workerNodeKey) &&
+ workerWeight >= this.roundWeights[roundIndex]
+ ) {
roundId = roundIndex
workerNodeId = workerNodeKey
break
roundId = roundIndex
workerNodeId = workerNodeKey
break