X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fworker%2Fcluster-worker.ts;h=35899e794f5b373aa5bca3ec5b3dbe2d1f5cd4c3;hb=c15638e23b33128fd31621a485252c1291197ab8;hp=e5bcb72781680fdcd9c0a3a505ae587947e35609;hpb=f05ed93ccebb3ea4212d015788bcd6ca9e0b38d2;p=poolifier.git diff --git a/src/worker/cluster-worker.ts b/src/worker/cluster-worker.ts index e5bcb727..35899e79 100644 --- a/src/worker/cluster-worker.ts +++ b/src/worker/cluster-worker.ts @@ -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 + }) } } }