cletus/node_modules/agenda/lib/job/touch.ts
2025-05-09 15:53:19 -05:00

11 lines
258 B
TypeScript

import { Job } from ".";
/**
* Updates "lockedAt" time so the job does not get picked up again
* @name Job#touch
* @function
*/
export const touch = async function (this: Job): Promise<Job> {
this.attrs.lockedAt = new Date();
return this.save();
};