X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fworker%2Fcluster-worker.ts;h=eedf13bd9265cb30b6d7cd689c42e2c517367acd;hb=eceaf36f69c97b0376194a849e77f6ea15fb8f7b;hp=fa810c7e66451ba978320ab887c8073c74214a88;hpb=d35e571704515a8b729d3455e4784054f07c368f;p=poolifier.git diff --git a/src/worker/cluster-worker.ts b/src/worker/cluster-worker.ts index fa810c7e..eedf13bd 100644 --- a/src/worker/cluster-worker.ts +++ b/src/worker/cluster-worker.ts @@ -32,7 +32,7 @@ export class ClusterWorker< taskFunctions: TaskFunction | TaskFunctions, opts: WorkerOptions = {} ) { - super(cluster.isPrimary, cluster.worker as Worker, taskFunctions, opts) + super(cluster.isPrimary, cluster.worker, taskFunctions, opts) } /** @inheritDoc */ @@ -62,6 +62,9 @@ export class ClusterWorker< protected readonly sendToMainWorker = ( message: MessageValue ): void => { - this.getMainWorker().send({ ...message, workerId: this.id }) + this.getMainWorker().send({ + ...message, + workerId: this.id + } satisfies MessageValue) } }