for (const [workerNodeKey] of this.workerNodes.entries()) {
this.workerNodes[workerNodeKey].addEventListener(
'emptyqueue',
- this.handleEmptyQueueEvent
+ this.handleEmptyQueueEvent as EventListener
)
}
}
for (const [workerNodeKey] of this.workerNodes.entries()) {
this.workerNodes[workerNodeKey].removeEventListener(
'emptyqueue',
- this.handleEmptyQueueEvent
+ this.handleEmptyQueueEvent as EventListener
)
}
}
for (const [workerNodeKey] of this.workerNodes.entries()) {
this.workerNodes[workerNodeKey].addEventListener(
'backpressure',
- this.handleBackPressureEvent
+ this.handleBackPressureEvent as EventListener
)
}
}
for (const [workerNodeKey] of this.workerNodes.entries()) {
this.workerNodes[workerNodeKey].removeEventListener(
'backpressure',
- this.handleBackPressureEvent
+ this.handleBackPressureEvent as EventListener
)
}
}
if (this.opts.tasksQueueOptions?.taskStealing === true) {
this.workerNodes[workerNodeKey].addEventListener(
'emptyqueue',
- this.handleEmptyQueueEvent
+ this.handleEmptyQueueEvent as EventListener
)
}
if (this.opts.tasksQueueOptions?.tasksStealingOnBackPressure === true) {
this.workerNodes[workerNodeKey].addEventListener(
'backpressure',
- this.handleBackPressureEvent
+ this.handleBackPressureEvent as EventListener
)
}
}