Cancel
pulse.cancel(query)
pulse.cancel(query)Example Usage
const pulse = new Pulse();
// Example of canceling all jobs with a specific priority
const query = { priority: { $lt: 0 } }; // Cancels all jobs with a negative priority
pulse.cancel(query)
.then(deletedCount => console.log(`${deletedCount} low priority jobs cancelled`))
.catch(error => console.error('Failed to cancel jobs:', error));Parameters
Returns
Last updated