X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fworker%2Fcluster-worker.ts;h=201a516c56e1d8ab2a3d2d569c4d54d7f0fd484d;hb=4608939f425568da5553db1f5bf883d4cca18e02;hp=1f9895d6e37b25a73911cd84f1c1f6f7404a98b8;hpb=c172526cd82999efbace45402e0bd6d9ae173963;p=poolifier.git diff --git a/src/worker/cluster-worker.ts b/src/worker/cluster-worker.ts index 1f9895d6..201a516c 100644 --- a/src/worker/cluster-worker.ts +++ b/src/worker/cluster-worker.ts @@ -48,14 +48,12 @@ export class ClusterWorker< this.getMainWorker().on('message', this.messageListener.bind(this)) this.sendToMainWorker({ ready: true, - taskFunctionNames: this.listTaskFunctionNames(), - workerId: this.id + taskFunctionNames: this.listTaskFunctionNames() }) } catch { this.sendToMainWorker({ ready: false, - taskFunctionNames: this.listTaskFunctionNames(), - workerId: this.id + taskFunctionNames: this.listTaskFunctionNames() }) } } @@ -68,6 +66,6 @@ export class ClusterWorker< /** @inheritDoc */ protected sendToMainWorker (message: MessageValue): void { - this.getMainWorker().send(message) + this.getMainWorker().send({ ...message, workerId: this.id }) } }