import {
type IWorkerChoiceStrategy,
Measurements,
- type StrategyPolicy,
type TaskStatisticsRequirements,
type WorkerChoiceStrategyOptions
} from './selection-strategies-types'
>
extends AbstractWorkerChoiceStrategy<Worker, Data, Response>
implements IWorkerChoiceStrategy {
- /** @inheritDoc */
- public readonly strategyPolicy: StrategyPolicy = {
- dynamicWorkerUsage: false,
- dynamicWorkerReady: true
- }
-
/** @inheritDoc */
public readonly taskStatisticsRequirements: TaskStatisticsRequirements = {
runTime: {
/** @inheritDoc */
public choose (): number | undefined {
- const chosenWorkerNodeKey = this.fairShareNextWorkerNodeKey()
- this.assignChosenWorkerNodeKey(chosenWorkerNodeKey)
+ this.nextWorkerNodeKey = this.fairShareNextWorkerNodeKey()
return this.nextWorkerNodeKey
}