X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fpools%2Fselection-strategies%2Ffair-share-worker-choice-strategy.ts;h=c6b87ade001759855115117d155a170a2e104c08;hb=28883f84b5381bb9af4c71e3bccd5297f6ab5fcf;hp=f47a1e6e9ba7724fa665235a2a9204219ed2220e;hpb=ae3ab61d14adc1f0511e8dea1f69a1d44e7effdf;p=poolifier.git diff --git a/src/pools/selection-strategies/fair-share-worker-choice-strategy.ts b/src/pools/selection-strategies/fair-share-worker-choice-strategy.ts index f47a1e6e..c6b87ade 100644 --- a/src/pools/selection-strategies/fair-share-worker-choice-strategy.ts +++ b/src/pools/selection-strategies/fair-share-worker-choice-strategy.ts @@ -1,16 +1,13 @@ -import { - DEFAULT_MEASUREMENT_STATISTICS_REQUIREMENTS, - DEFAULT_WORKER_CHOICE_STRATEGY_OPTIONS -} from '../../utils' -import type { IPool } from '../pool' -import type { IWorker, StrategyData } from '../worker' -import { AbstractWorkerChoiceStrategy } from './abstract-worker-choice-strategy' +import { DEFAULT_MEASUREMENT_STATISTICS_REQUIREMENTS } from '../../utils.js' +import type { IPool } from '../pool.js' +import type { IWorker, StrategyData } from '../worker.js' +import { AbstractWorkerChoiceStrategy } from './abstract-worker-choice-strategy.js' import { type IWorkerChoiceStrategy, + type InternalWorkerChoiceStrategyOptions, Measurements, - type TaskStatisticsRequirements, - type WorkerChoiceStrategyOptions -} from './selection-strategies-types' + type TaskStatisticsRequirements +} from './selection-strategies-types.js' /** * Selects the next worker with a fair share scheduling algorithm. @@ -45,7 +42,7 @@ export class FairShareWorkerChoiceStrategy< /** @inheritDoc */ public constructor ( pool: IPool, - opts: WorkerChoiceStrategyOptions = DEFAULT_WORKER_CHOICE_STRATEGY_OPTIONS + opts: InternalWorkerChoiceStrategyOptions ) { super(pool, opts) this.setTaskStatisticsRequirements(this.opts)