X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fpools%2Fcluster%2Fdynamic.ts;h=99a89966e914507fa6868883a0f67c751c8b29c6;hb=fa548cda5120ac0708d82f37cd0ce1260d7f96c1;hp=75296f7a1a894d45b51b65727610f53f361d6fc9;hpb=2431bdb4c2dc637169bf623a40fc6562f685e56e;p=poolifier.git diff --git a/src/pools/cluster/dynamic.ts b/src/pools/cluster/dynamic.ts index 75296f7a..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,7 +32,7 @@ export class DynamicClusterPool< opts: ClusterPoolOptions = {} ) { super(min, filePath, opts) - this.checkDynamicPoolSize(this.numberOfWorkers, this.max) + checkDynamicPoolSize(this.numberOfWorkers, this.max) } /** @inheritDoc */ @@ -39,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()