X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fpools%2Fcluster%2Fdynamic.ts;h=0a2d0f3879fc6ab44129608fec6d9c6624cd4c1a;hb=ffcbbad84f63b8a77f2b1a08f82deef5430f646e;hp=513a73c5d7804cfa2e109a5d9cf6c01f4c060945;hpb=4f3c3d894171421375559b43ce469bd5ccb475da;p=poolifier.git diff --git a/src/pools/cluster/dynamic.ts b/src/pools/cluster/dynamic.ts index 513a73c5..0a2d0f38 100644 --- a/src/pools/cluster/dynamic.ts +++ b/src/pools/cluster/dynamic.ts @@ -1,4 +1,3 @@ -import { EMPTY_OBJECT_LITERAL } from '../../utils' import { PoolType } from '../pool-internal' import type { ClusterPoolOptions } from './fixed' import { FixedClusterPool } from './fixed' @@ -30,7 +29,7 @@ export class DynamicClusterPool< min: number, protected readonly max: number, filePath: string, - opts: ClusterPoolOptions = EMPTY_OBJECT_LITERAL + opts: ClusterPoolOptions = {} ) { super(min, filePath, opts) } @@ -42,6 +41,6 @@ export class DynamicClusterPool< /** {@inheritDoc} */ public get busy (): boolean { - return this.workers.length === this.max + return this.workers.size === this.max } }