taskFunctions: TaskFunction<Data, Response> | TaskFunctions<Data, Response>,
opts: WorkerOptions = {}
) {
- super(
- 'worker-cluster-pool:poolifier',
- cluster.isPrimary,
- cluster.worker as Worker,
- taskFunctions,
- opts
- )
+ super(cluster.isPrimary, cluster.worker as Worker, taskFunctions, opts)
}
/** @inheritDoc */
}
/** @inheritDoc */
- protected sendToMainWorker (message: MessageValue<Response>): void {
+ protected readonly sendToMainWorker = (
+ message: MessageValue<Response>
+ ): void => {
this.getMainWorker().send({ ...message, workerId: this.id })
}
}