+ return cluster.isPrimary
+ }
+
+ /** @inheritDoc */
+ protected destroyWorkerNode (workerNodeKey: number): void {
+ const worker = this.workerNodes[workerNodeKey].worker
+ this.sendToWorker(workerNodeKey, { kill: true, workerId: worker.id })
+ worker.on('disconnect', () => {
+ worker.kill()
+ })
+ worker.disconnect()