import { AbstractWorkerChoiceStrategy } from './abstract-worker-choice-strategy'
import type {
IWorkerChoiceStrategy,
- StrategyPolicy,
WorkerChoiceStrategyOptions
} from './selection-strategies-types'
>
extends AbstractWorkerChoiceStrategy<Worker, Data, Response>
implements IWorkerChoiceStrategy {
- /** @inheritDoc */
- public readonly strategyPolicy: StrategyPolicy = {
- dynamicWorkerUsage: false,
- dynamicWorkerReady: true
- }
-
/**
* Round id.
* This is used to determine the current round weight.
/** @inheritDoc */
public reset (): boolean {
- this.nextWorkerNodeKey = 0
+ this.resetWorkerNodeKeyProperties()
this.roundId = 0
return true
}
/** @inheritDoc */
public choose (): number | undefined {
- let roundId: number = this.roundId
+ let roundId!: number
let workerNodeId: number | undefined
for (
let roundIndex = this.roundId;