From: Jérôme Benoit Date: Sun, 17 Sep 2023 15:56:53 +0000 (+0200) Subject: refactor: rename method in worker X-Git-Tag: v2.7.0~27 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=583c39814fb46a0483e79c3f6d9c042cf9b1821f;p=poolifier.git refactor: rename method in worker Signed-off-by: Jérôme Benoit --- diff --git a/src/worker/abstract-worker.ts b/src/worker/abstract-worker.ts index 8551ffc8..f0ef5932 100644 --- a/src/worker/abstract-worker.ts +++ b/src/worker/abstract-worker.ts @@ -130,7 +130,7 @@ export abstract class AbstractWorker< this.opts = { ...DEFAULT_WORKER_OPTIONS, ...opts } } - private checkValidTaskFunction ( + private checkValidTaskFunctionEntry ( name: string, fn: TaskFunction ): void { @@ -176,7 +176,7 @@ export abstract class AbstractWorker< } else if (isPlainObject(taskFunctions)) { let firstEntry = true for (const [name, fn] of Object.entries(taskFunctions)) { - this.checkValidTaskFunction(name, fn) + this.checkValidTaskFunctionEntry(name, fn) const boundFn = fn.bind(this) if (firstEntry) { this.taskFunctions.set(DEFAULT_TASK_NAME, boundFn)