repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build(deps-dev): bump rollup
[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 7fba0f1b5dad0972af4ae9630b3c8565301a7863..b034cba1d08d69761b3c8f05fdedf395c4702c0a 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
@@
-53,9
+53,9
@@
export class InterleavedWeightedRoundRobinWorkerChoiceStrategy<
*/
private workerNodeId: number = 0
/**
*/
private workerNodeId: number = 0
/**
- * Worker virtual task runtime.
+ * Worker
node
virtual task runtime.
*/
*/
- private workerVirtualTaskRunTime: number = 0
+ private worker
Node
VirtualTaskRunTime: number = 0
/** @inheritDoc */
public constructor (
/** @inheritDoc */
public constructor (
@@
-73,7
+73,7
@@
export class InterleavedWeightedRoundRobinWorkerChoiceStrategy<
this.resetWorkerNodeKeyProperties()
this.roundId = 0
this.workerNodeId = 0
this.resetWorkerNodeKeyProperties()
this.roundId = 0
this.workerNodeId = 0
- this.workerVirtualTaskRunTime = 0
+ this.worker
Node
VirtualTaskRunTime = 0
return true
}
return true
}
@@
-98,19
+98,19
@@
export class InterleavedWeightedRoundRobinWorkerChoiceStrategy<
this.workerNodeId = workerNodeKey
if (
this.workerNodeId !== this.nextWorkerNodeKey &&
this.workerNodeId = workerNodeKey
if (
this.workerNodeId !== this.nextWorkerNodeKey &&
- this.workerVirtualTaskRunTime !== 0
+ this.worker
Node
VirtualTaskRunTime !== 0
) {
) {
- this.workerVirtualTaskRunTime = 0
+ this.worker
Node
VirtualTaskRunTime = 0
}
const workerWeight =
this.opts.weights?.[workerNodeKey] ?? this.defaultWorkerWeight
if (
workerWeight >= this.roundWeights[roundIndex] &&
}
const workerWeight =
this.opts.weights?.[workerNodeKey] ?? this.defaultWorkerWeight
if (
workerWeight >= this.roundWeights[roundIndex] &&
- this.workerVirtualTaskRunTime < workerWeight
+ this.worker
Node
VirtualTaskRunTime < workerWeight
) {
) {
- this.workerVirtualTaskRunTime =
- this.workerVirtualTaskRunTime +
- this.getWorkerTaskRunTime(workerNodeKey)
+ this.worker
Node
VirtualTaskRunTime =
+ this.worker
Node
VirtualTaskRunTime +
+ this.getWorker
Node
TaskRunTime(workerNodeKey)
this.setPreviousWorkerNodeKey(this.nextWorkerNodeKey)
this.nextWorkerNodeKey = workerNodeKey
return this.nextWorkerNodeKey
this.setPreviousWorkerNodeKey(this.nextWorkerNodeKey)
this.nextWorkerNodeKey = workerNodeKey
return this.nextWorkerNodeKey