- private getWorkerInfo (workerNodeKey: number): WorkerInfo {
- return this.workerNodes[workerNodeKey].info
- }
-
- /**
- * Gets the worker information from the given worker.
- *
- * @param worker - The worker.
- * @returns The worker information.
- * @throws {@link https://nodejs.org/api/errors.html#class-error} If the worker is not found.
- */
- protected getWorkerInfoByWorker (worker: Worker): WorkerInfo {
- const workerNodeKey = this.getWorkerNodeKey(worker)
- if (workerNodeKey === -1) {
- throw new Error('Worker not found')
- }