refactor: rename method in worker
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Sun, 17 Sep 2023 15:56:53 +0000 (17:56 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Sun, 17 Sep 2023 15:56:53 +0000 (17:56 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
src/worker/abstract-worker.ts

index 8551ffc8ae2eef49bfb61567198ead269fef6bd7..f0ef59327c6099bc3719be1d84b537b0496fdd22 100644 (file)
@@ -130,7 +130,7 @@ export abstract class AbstractWorker<
     this.opts = { ...DEFAULT_WORKER_OPTIONS, ...opts }
   }
 
-  private checkValidTaskFunction (
+  private checkValidTaskFunctionEntry (
     name: string,
     fn: TaskFunction<Data, Response>
   ): 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)