refactor: align methods signature
[poolifier.git] / src / pools / cluster / dynamic.ts
index 6171ce4e8a4b51991294677b680e9373d8e64313..89180f1f161d9351190189ff06cd7e76a40f30d5 100644 (file)
@@ -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()
   }
 }