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
/
fair-share-worker-choice-strategy.ts
diff --git
a/src/pools/selection-strategies/fair-share-worker-choice-strategy.ts
b/src/pools/selection-strategies/fair-share-worker-choice-strategy.ts
index af3fcfa00ce06fdb369f7372e8154016a504efce..a337278ba9ce75a074c1b32d751d8f928ec86496 100644
(file)
--- a/
src/pools/selection-strategies/fair-share-worker-choice-strategy.ts
+++ b/
src/pools/selection-strategies/fair-share-worker-choice-strategy.ts
@@
-128,12
+128,12
@@
export class FairShareWorkerChoiceStrategy<
private getWorkerNodeVirtualTaskStartTimestamp (
workerNodeKey: number
): number {
private getWorkerNodeVirtualTaskStartTimestamp (
workerNodeKey: number
): number {
+ const virtualTaskEndTimestamp =
+ this.pool.workerNodes[workerNodeKey]?.strategyData
+ ?.virtualTaskEndTimestamp
const now = performance.now()
const now = performance.now()
- return now <
- (this.pool.workerNodes[workerNodeKey]?.strategyData
- ?.virtualTaskEndTimestamp ?? -Infinity)
- ? (this.pool.workerNodes[workerNodeKey]?.strategyData
- ?.virtualTaskEndTimestamp as number)
+ return now < (virtualTaskEndTimestamp ?? -Infinity)
+ ? (virtualTaskEndTimestamp as number)
: now
}
}
: now
}
}