refactor: remove unused queue code
[poolifier.git] / src / worker / cluster-worker.ts
index e5bcb72781680fdcd9c0a3a505ae587947e35609..35899e794f5b373aa5bca3ec5b3dbe2d1f5cd4c3 100644 (file)
@@ -46,10 +46,17 @@ export class ClusterWorker<
     if (message.workerId === this.id && message.ready === false) {
       try {
         this.getMainWorker()?.on('message', this.messageListener.bind(this))
-        this.sendTaskFunctionsListToMainWorker()
-        this.sendToMainWorker({ ready: true, workerId: this.id })
+        this.sendToMainWorker({
+          ready: true,
+          taskFunctions: this.listTaskFunctions(),
+          workerId: this.id
+        })
       } catch {
-        this.sendToMainWorker({ ready: false, workerId: this.id })
+        this.sendToMainWorker({
+          ready: false,
+          taskFunctions: this.listTaskFunctions(),
+          workerId: this.id
+        })
       }
     }
   }