X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fpools%2Fselection-strategies%2Finterleaved-weighted-round-robin-worker-choice-strategy.ts;h=deaa48815e97f0b0d9fc8e42ffc845c6fa118982;hb=6c6afb8463782af0689101b7c67cea80df83018f;hp=7248f03a90ae8f9ec599eb3c062eb6349337c95c;hpb=a77ac8fcba99a9580ff6524d70d2fab7dbdd448d;p=poolifier.git 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 7248f03a..deaa4881 100644 --- 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 @@ -4,6 +4,7 @@ import { DEFAULT_WORKER_CHOICE_STRATEGY_OPTIONS } from '../../utils' import { AbstractWorkerChoiceStrategy } from './abstract-worker-choice-strategy' import type { IWorkerChoiceStrategy, + StrategyPolicy, WorkerChoiceStrategyOptions } from './selection-strategies-types' @@ -21,6 +22,11 @@ export class InterleavedWeightedRoundRobinWorkerChoiceStrategy< > extends AbstractWorkerChoiceStrategy implements IWorkerChoiceStrategy { + /** @inheritDoc */ + public readonly strategyPolicy: StrategyPolicy = { + useDynamicWorker: true + } + /** * Worker node id where the current task will be submitted. */ @@ -45,7 +51,7 @@ export class InterleavedWeightedRoundRobinWorkerChoiceStrategy< opts: WorkerChoiceStrategyOptions = DEFAULT_WORKER_CHOICE_STRATEGY_OPTIONS ) { super(pool, opts) - this.setRequiredStatistics(this.opts) + this.setTaskStatisticsRequirements(this.opts) this.defaultWorkerWeight = this.computeDefaultWorkerWeight() this.roundWeights = this.getRoundWeights() }