if (message.kill === 'success') {
resolve()
} else if (message.kill === 'failure') {
- reject(new Error('Worker kill message handling failed'))
+ reject(new Error(`Worker ${workerId} kill message handling failed`))
}
})
})
workerUsage.tasks.executing === 0 &&
this.tasksQueueSize(localWorkerNodeKey) === 0)))
) {
- this.destroyWorkerNode(localWorkerNodeKey).catch(EMPTY_FUNCTION)
+ this.destroyWorkerNode(localWorkerNodeKey).catch((error) => {
+ this.emitter?.emit(PoolEvents.error, error)
+ })
}
})
const workerInfo = this.getWorkerInfo(workerNodeKey)