X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fpools%2Fcluster%2Fdynamic.ts;h=99a89966e914507fa6868883a0f67c751c8b29c6;hb=fa548cda5120ac0708d82f37cd0ce1260d7f96c1;hp=a9ccd6977255bcadc43bee150d8684a3ee3ad75e;hpb=e102732c0e3966b81834b2c0bdd087eb051162ad;p=poolifier.git diff --git a/src/pools/cluster/dynamic.ts b/src/pools/cluster/dynamic.ts index a9ccd697..99a89966 100644 --- a/src/pools/cluster/dynamic.ts +++ b/src/pools/cluster/dynamic.ts @@ -1,4 +1,5 @@ import { type PoolType, PoolTypes } from '../pool' +import { checkDynamicPoolSize } from '../utils' import { type ClusterPoolOptions, FixedClusterPool } from './fixed' /** @@ -31,6 +32,7 @@ export class DynamicClusterPool< opts: ClusterPoolOptions = {} ) { super(min, filePath, opts) + checkDynamicPoolSize(this.numberOfWorkers, this.max) } /** @inheritDoc */ @@ -38,11 +40,6 @@ export class DynamicClusterPool< return PoolTypes.dynamic } - /** @inheritDoc */ - protected get maxSize (): number { - return this.max - } - /** @inheritDoc */ protected get busy (): boolean { return this.full && this.internalBusy()