X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fpools%2Fcluster%2Fdynamic.ts;h=9f9abb01ddaa5f3015ef4a08bd2ee046dc9312c9;hb=6c9d7004857091d1d46e65cb7a9871bb271a2516;hp=6171ce4e8a4b51991294677b680e9373d8e64313;hpb=afc003b20097712625ffd053e256ef5336e27b6e;p=poolifier.git diff --git a/src/pools/cluster/dynamic.ts b/src/pools/cluster/dynamic.ts index 6171ce4e..9f9abb01 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.findFreeWorkerNodeKey() === -1 } }