From: Jérôme Benoit Date: Thu, 6 Apr 2023 06:59:35 +0000 (+0200) Subject: refactor: remove unused method argument X-Git-Tag: v2.4.2~3 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=1ae4d2778d03052177f35cd6e5c348a7fb6691f0;p=poolifier.git refactor: remove unused method argument Signed-off-by: Jérôme Benoit --- diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index 476a5237..afd7914e 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -189,7 +189,6 @@ export abstract class AbstractPool< }) } this.workerChoiceStrategyContext.setWorkerChoiceStrategy( - this, workerChoiceStrategy ) } diff --git a/src/pools/selection-strategies/worker-choice-strategy-context.ts b/src/pools/selection-strategies/worker-choice-strategy-context.ts index 2d337387..3fbf5e23 100644 --- a/src/pools/selection-strategies/worker-choice-strategy-context.ts +++ b/src/pools/selection-strategies/worker-choice-strategy-context.ts @@ -88,7 +88,6 @@ export class WorkerChoiceStrategyContext< * @param workerChoiceStrategy - The worker choice strategy to set. */ public setWorkerChoiceStrategy ( - pool: IPoolInternal, workerChoiceStrategy: WorkerChoiceStrategy ): void { if (this.workerChoiceStrategyType === workerChoiceStrategy) { diff --git a/tests/pools/selection-strategies/worker-choice-strategy-context.test.js b/tests/pools/selection-strategies/worker-choice-strategy-context.test.js index cdefafeb..7c46601f 100644 --- a/tests/pools/selection-strategies/worker-choice-strategy-context.test.js +++ b/tests/pools/selection-strategies/worker-choice-strategy-context.test.js @@ -115,7 +115,6 @@ describe('Worker choice strategy context test suite', () => { WorkerChoiceStrategies.ROUND_ROBIN ) workerChoiceStrategyContext.setWorkerChoiceStrategy( - fixedPool, WorkerChoiceStrategies.ROUND_ROBIN ) expect( @@ -141,7 +140,6 @@ describe('Worker choice strategy context test suite', () => { WorkerChoiceStrategies.ROUND_ROBIN ) workerChoiceStrategyContext.setWorkerChoiceStrategy( - dynamicPool, WorkerChoiceStrategies.ROUND_ROBIN ) expect( @@ -159,7 +157,6 @@ describe('Worker choice strategy context test suite', () => { fixedPool ) workerChoiceStrategyContext.setWorkerChoiceStrategy( - fixedPool, WorkerChoiceStrategies.LESS_USED ) expect( @@ -177,7 +174,6 @@ describe('Worker choice strategy context test suite', () => { dynamicPool ) workerChoiceStrategyContext.setWorkerChoiceStrategy( - dynamicPool, WorkerChoiceStrategies.LESS_USED ) expect( @@ -195,7 +191,6 @@ describe('Worker choice strategy context test suite', () => { fixedPool ) workerChoiceStrategyContext.setWorkerChoiceStrategy( - fixedPool, WorkerChoiceStrategies.LESS_BUSY ) expect( @@ -213,7 +208,6 @@ describe('Worker choice strategy context test suite', () => { dynamicPool ) workerChoiceStrategyContext.setWorkerChoiceStrategy( - dynamicPool, WorkerChoiceStrategies.LESS_BUSY ) expect( @@ -231,7 +225,6 @@ describe('Worker choice strategy context test suite', () => { fixedPool ) workerChoiceStrategyContext.setWorkerChoiceStrategy( - fixedPool, WorkerChoiceStrategies.FAIR_SHARE ) expect( @@ -249,7 +242,6 @@ describe('Worker choice strategy context test suite', () => { dynamicPool ) workerChoiceStrategyContext.setWorkerChoiceStrategy( - dynamicPool, WorkerChoiceStrategies.FAIR_SHARE ) expect( @@ -267,7 +259,6 @@ describe('Worker choice strategy context test suite', () => { fixedPool ) workerChoiceStrategyContext.setWorkerChoiceStrategy( - fixedPool, WorkerChoiceStrategies.WEIGHTED_ROUND_ROBIN ) expect( @@ -285,7 +276,6 @@ describe('Worker choice strategy context test suite', () => { dynamicPool ) workerChoiceStrategyContext.setWorkerChoiceStrategy( - dynamicPool, WorkerChoiceStrategies.WEIGHTED_ROUND_ROBIN ) expect(