perf: optimize fixed pool busyness detection
[poolifier.git] / src / pools / cluster / dynamic.ts
index b84a80ce2b31b7fc807bceae6b29e1a7eb2af5bd..9f9abb01ddaa5f3015ef4a08bd2ee046dc9312c9 100644 (file)
@@ -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
   }
 }