X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fpools%2Fselection-strategies%2Fabstract-worker-choice-strategy.ts;h=c364933358528ef3ade54a3cc3dd474cf2c2d9d3;hb=a38b62f12dcf25476b2d0409edfa98f96a36da20;hp=86692de92f50c6cc9b1c1c7bcb3e1e960d5693e5;hpb=ca57f271eeee850c946584ba7cb96e8fc5f84f8b;p=poolifier.git diff --git a/src/pools/selection-strategies/abstract-worker-choice-strategy.ts b/src/pools/selection-strategies/abstract-worker-choice-strategy.ts index 86692de9..c3649333 100644 --- a/src/pools/selection-strategies/abstract-worker-choice-strategy.ts +++ b/src/pools/selection-strategies/abstract-worker-choice-strategy.ts @@ -126,6 +126,15 @@ export abstract class AbstractWorkerChoiceStrategy< return this.pool.workerNodes[workerNodeKey]?.info?.ready ?? false } + /** + * Check the next worker node readiness. + */ + protected checkNextWorkerNodeReadiness (): void { + if (!this.isWorkerNodeReady(this.nextWorkerNodeKey as number)) { + delete this.nextWorkerNodeKey + } + } + /** * Gets the worker node task runtime. * If the task statistics require the average runtime, the average runtime is returned.