X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fpools%2Fcluster%2Fdynamic.ts;h=89180f1f161d9351190189ff06cd7e76a40f30d5;hb=f9f00b5f18805c14b1bac3b2e5d2e8b5abc6c66c;hp=6171ce4e8a4b51991294677b680e9373d8e64313;hpb=afc003b20097712625ffd053e256ef5336e27b6e;p=poolifier.git diff --git a/src/pools/cluster/dynamic.ts b/src/pools/cluster/dynamic.ts index 6171ce4e..89180f1f 100644 --- a/src/pools/cluster/dynamic.ts +++ b/src/pools/cluster/dynamic.ts @@ -27,7 +27,7 @@ export class DynamicClusterPool< */ public constructor ( min: number, - private readonly max: number, + public readonly max: number, filePath: string, opts: ClusterPoolOptions = {} ) { @@ -41,11 +41,11 @@ export class DynamicClusterPool< /** @inheritDoc */ public get full (): boolean { - return this.workers.length === this.max + return this.workerNodes.length === this.max } /** @inheritDoc */ public get busy (): boolean { - return this.full && this.findFreeWorkerKey() === -1 + return this.full && this.internalBusy() } }