-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Description
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];
}
});
zisiszikos, m-shojaei and supersebh
Metadata
Metadata
Assignees
Labels
No labels