X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fpools%2Fselection-strategies%2Fworker-choice-strategy-context.ts;h=8041e2f6577b7ca046c6e51048ed2a7d873923db;hb=ccd49f039d24ec1590b2b32ff1738c80fae743e5;hp=3d122f0292d77805a3e59fb56a386fbec1b54396;hpb=1b97e1c79d3a35e80e643140546227988b7e55d7;p=poolifier.git diff --git a/src/pools/selection-strategies/worker-choice-strategy-context.ts b/src/pools/selection-strategies/worker-choice-strategy-context.ts index 3d122f02..8041e2f6 100644 --- a/src/pools/selection-strategies/worker-choice-strategy-context.ts +++ b/src/pools/selection-strategies/worker-choice-strategy-context.ts @@ -1,5 +1,4 @@ import type { IPoolInternal } from '../pool-internal' -import { PoolType } from '../pool-internal' import type { IPoolWorker } from '../pool-worker' import type { IWorkerChoiceStrategy, @@ -70,7 +69,7 @@ export class WorkerChoiceStrategyContext< */ public execute (): number { if ( - this.pool.type === PoolType.DYNAMIC && + this.workerChoiceStrategy.isDynamicPool && !this.pool.full && this.pool.findFreeWorkerKey() === -1 ) {