Hi there,
It appears that the priorities implementation is leaking.
Whenever a taskid (autogenerated or custom) is added to queue._store._priorities, it never gets deleted. So as long as tasks are added to a prioritised queue, the queue is leaking few bytes at a time. Depending on the tasks frequency you might start leaking MBs in few minutes to hours.
So practically the problem is that the priorities are not cleared for finished or failed tasks.
Currently the workaround we have applied is related with manually deleting the task ids, whenever task_finish or task_failed are triggered with the respective id.
this.mainQueue.on('task_finish', taskId => {
delete this.mainQueue._store._priorities[taskId];
});
this.mainQueue.on('task_failed', (taskId, err) => {
if (err) {
console.error(err);
} else {
delete this.mainQueue._store._priorities[taskId];
}
});
Hi there,
It appears that the priorities implementation is leaking.
Whenever a
taskid(autogenerated or custom) is added toqueue._store._priorities, it never gets deleted. So as long as tasks are added to a prioritised queue, the queue is leaking few bytes at a time. Depending on the tasks frequency you might start leaking MBs in few minutes to hours.So practically the problem is that the priorities are not cleared for finished or failed tasks.
Currently the workaround we have applied is related with manually deleting the task ids, whenever
task_finishortask_failedare triggered with the respective id.