From: Jérôme Benoit Date: Sat, 15 Apr 2023 12:22:41 +0000 (+0200) Subject: docs: align methods signature namespace X-Git-Tag: v2.4.9~12 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=8f52842f4b4fa9059f25fc4a90e8bbe8db2f5e63;p=poolifier.git docs: align methods signature namespace Signed-off-by: Jérôme Benoit --- diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index 9ba4fbf9..3bc00a6f 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -251,21 +251,25 @@ export abstract class AbstractPool< } /** @inheritDoc */ - public enableTasksQueue (enable: boolean, opts?: TasksQueueOptions): void { + public enableTasksQueue ( + enable: boolean, + tasksQueueOptions?: TasksQueueOptions + ): void { if (this.opts.enableTasksQueue === true && !enable) { for (const [workerNodeKey] of this.workerNodes.entries()) { this.flushTasksQueue(workerNodeKey) } } this.opts.enableTasksQueue = enable - this.setTasksQueueOptions(opts as TasksQueueOptions) + this.setTasksQueueOptions(tasksQueueOptions as TasksQueueOptions) } /** @inheritDoc */ - public setTasksQueueOptions (opts: TasksQueueOptions): void { + public setTasksQueueOptions (tasksQueueOptions: TasksQueueOptions): void { if (this.opts.enableTasksQueue === true) { - this.checkValidTasksQueueOptions(opts) - this.opts.tasksQueueOptions = this.buildTasksQueueOptions(opts) + this.checkValidTasksQueueOptions(tasksQueueOptions) + this.opts.tasksQueueOptions = + this.buildTasksQueueOptions(tasksQueueOptions) } else { delete this.opts.tasksQueueOptions } diff --git a/src/pools/pool.ts b/src/pools/pool.ts index a0663ba5..396c59ad 100644 --- a/src/pools/pool.ts +++ b/src/pools/pool.ts @@ -183,7 +183,10 @@ export interface IPool< * @param enable - Whether to enable or disable the worker tasks queue. * @param tasksQueueOptions - The worker tasks queue options. */ - enableTasksQueue: (enable: boolean, opts?: TasksQueueOptions) => void + enableTasksQueue: ( + enable: boolean, + tasksQueueOptions?: TasksQueueOptions + ) => void /** * Sets the worker tasks queue options in this pool. *