Touch
job.touch(progress?)
job.touch(progress?)
The touch
method updates the lockedAt
timestamp of a job to the current time. This is particularly useful for ensuring that a job remains locked during long-running processes, preventing it from being considered as timed out or available for reprocessing by other workers or job instances.
Example Usage
Parameters
progress
(number?
): An optional argument that indicates progress value for the proceeding task.
Returns
Promise<Job>
: A promise that resolves with the updated job instance after thelockedAt
time has been refreshed and the job has been saved.
Last updated