From 8b4d450024ef06de939fa82f9746b005696914c0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Fri, 7 Apr 2023 19:12:57 +0200 Subject: [PATCH] refactor: limit properties scope on worker choosing code MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- .../selection-strategies/abstract-worker-choice-strategy.ts | 4 ++-- src/pools/selection-strategies/selection-strategies-types.ts | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/pools/selection-strategies/abstract-worker-choice-strategy.ts b/src/pools/selection-strategies/abstract-worker-choice-strategy.ts index f32229ec..b0a624da 100644 --- a/src/pools/selection-strategies/abstract-worker-choice-strategy.ts +++ b/src/pools/selection-strategies/abstract-worker-choice-strategy.ts @@ -19,7 +19,7 @@ export abstract class AbstractWorkerChoiceStrategy< Response = unknown > implements IWorkerChoiceStrategy { /** @inheritDoc */ - public readonly isDynamicPool: boolean + protected readonly isDynamicPool: boolean /** @inheritDoc */ public requiredStatistics: RequiredStatistics = { runTime: false, @@ -32,7 +32,7 @@ export abstract class AbstractWorkerChoiceStrategy< * @param pool - The pool instance. */ public constructor ( - public readonly pool: IPoolInternal + protected readonly pool: IPoolInternal ) { this.isDynamicPool = this.pool.type === PoolType.DYNAMIC this.choose.bind(this) diff --git a/src/pools/selection-strategies/selection-strategies-types.ts b/src/pools/selection-strategies/selection-strategies-types.ts index 9acf819b..2c6c2e16 100644 --- a/src/pools/selection-strategies/selection-strategies-types.ts +++ b/src/pools/selection-strategies/selection-strategies-types.ts @@ -41,10 +41,6 @@ export interface RequiredStatistics { * Worker choice strategy interface. */ export interface IWorkerChoiceStrategy { - /** - * Is the pool bound to the strategy dynamic?. - */ - readonly isDynamicPool: boolean /** * Required pool tasks usage statistics. */ -- 2.34.1