X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fpools%2Fselection-strategies%2Fleast-busy-worker-choice-strategy.ts;h=de71167ee8d307bf8c9b20f5f2df6fca7d9374c6;hb=a7385b49901fc73522c657776611159cd3c35bad;hp=6fad8939e75aa0f2a3dca8e332c08ba529ba3a83;hpb=fce028d66b18a0e46571eb82457055fe3177d702;p=poolifier.git 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 6fad8939..de71167e 100644 --- a/src/pools/selection-strategies/least-busy-worker-choice-strategy.ts +++ b/src/pools/selection-strategies/least-busy-worker-choice-strategy.ts @@ -77,13 +77,10 @@ export class LeastBusyWorkerChoiceStrategy< const workerTime = (workerNode.usage.runTime?.aggregate ?? 0) + (workerNode.usage.waitTime?.aggregate ?? 0) - if (this.isWorkerNodeEligible(workerNodeKey) && workerTime === 0) { + if (workerTime === 0) { chosenWorkerNodeKey = workerNodeKey break - } else if ( - this.isWorkerNodeEligible(workerNodeKey) && - workerTime < minTime - ) { + } else if (workerTime < minTime) { minTime = workerTime chosenWorkerNodeKey = workerNodeKey }