this.getWorkerRunningTasks(workerCreated) === 0
) {
// Kill received from the worker, means that no new tasks are submitted to that worker for a while ( > maxInactiveTime)
- void (this.destroyWorker(workerCreated) as Promise<void>)
+ void this.destroyWorker(workerCreated)
}
})
return workerCreated
const res = this.internalExecute(worker, this.nextMessageId)
this.checkAndEmitBusy()
this.sendToWorker(worker, {
- data,
+ // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
+ data: data ?? ({} as Data),
id: this.nextMessageId
})
++this.nextMessageId