-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
Description
According to REFERENCE.md:
.on('removed', function (job) {
// A job successfully removed.
});
In job.js this event is emited with job id here:
Job.remove = async function(queue, pattern) {
await queue.isReady();
const removed = await scripts.removeWithPattern(queue, pattern);
removed.forEach(jobId => queue.emit('removed', jobId));
};
And with the full Job object here:
Job.prototype.remove = function() {
const queue = this.queue;
const job = this;
return queue.isReady().then(() => {
return scripts.remove(queue, job.id).then(removed => {
if (removed) {
queue.emit('removed', job);
} else {
throw new Error('Could not remove job ' + job.id);
}
});
});
};