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
/
least-busy-worker-choice-strategy.ts
diff --git
a/src/pools/selection-strategies/least-busy-worker-choice-strategy.ts
b/src/pools/selection-strategies/least-busy-worker-choice-strategy.ts
index dabad6826568c38621c73d8fa4f6ac4efb28418f..9a1550e06f60dfecc4339f56ac2c01ad3a7344cf 100644
(file)
--- a/
src/pools/selection-strategies/least-busy-worker-choice-strategy.ts
+++ b/
src/pools/selection-strategies/least-busy-worker-choice-strategy.ts
@@
-61,8
+61,7
@@
export class LeastBusyWorkerChoiceStrategy<
/** @inheritDoc */
public choose (): number {
/** @inheritDoc */
public choose (): number {
- this.leastBusyNextWorkerNodeKey()
- return this.nextWorkerNodeKey
+ return this.leastBusyNextWorkerNodeKey()
}
/** @inheritDoc */
}
/** @inheritDoc */
@@
-70,7
+69,7
@@
export class LeastBusyWorkerChoiceStrategy<
return true
}
return true
}
- private leastBusyNextWorkerNodeKey ():
void
{
+ private leastBusyNextWorkerNodeKey ():
number
{
let minTime = Infinity
for (const [workerNodeKey, workerNode] of this.pool.workerNodes.entries()) {
const workerTime =
let minTime = Infinity
for (const [workerNodeKey, workerNode] of this.pool.workerNodes.entries()) {
const workerTime =
@@
-87,5
+86,6
@@
export class LeastBusyWorkerChoiceStrategy<
this.nextWorkerNodeKey = workerNodeKey
}
}
this.nextWorkerNodeKey = workerNodeKey
}
}
+ return this.nextWorkerNodeKey
}
}
}
}