Stop
pulse.stop()
pulse.stop()
The stop
method halts the job processing activity initiated by the start
method, effectively stopping the job processing interval. Additionally, it includes an operation to unlock any jobs that were locked at the time of stopping, making them available for reprocessing if necessary. This functionality is crucial for ensuring a graceful shutdown of the system, where currently running or grabbed jobs are released. This allows other job queues to pick them up or ensures they are available when the job queue is restarted.
Example Usage
Parameters
Returns
Promise<void>
: A promise that resolves when the job processing interval is cleared and all locked jobs are unlocked. It handles any failures during the unlocking process.
Last updated