Pulse
GithubCloud(Pulsecron)
  • What is Pulse?
  • Why Pulse?
  • Quick Start
  • DOCS
    • Setup & Config
      • Connection
      • Config
        • Name
        • ProcessEvery
        • DefaultConcurrency
        • MaxConcurrency
        • LockLimit
        • DefaultLockLimit
        • DefaultLockLifetime
        • Sort
        • ResumeOnRestart
    • Defining Job Processors
    • Managing Job Processor
      • Start
      • Stop
    • Creating Jobs
      • Every
      • Schedule
      • Now
      • Create
    • Managing Jobs
      • Jobs
      • Cancel
      • Disable
      • Enable
      • Purge
      • isRunning
      • isExpired
      • Manually working
        • Save
        • Unique
        • RepeatEvery
        • RepeatAt
        • Schedule
        • Remove
        • Priority
        • Touch
        • SetShouldSaveResult
        • Fail
        • Run
        • Disable
        • Enable
Powered by GitBook
On this page
  • job.touch(progress?)
  • Example Usage
  • Parameters
  • Returns

Was this helpful?

Edit on GitHub
  1. DOCS
  2. Managing Jobs
  3. Manually working

Touch

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

const job = pulse.create('test', {});
job.touch(10);

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 the lockedAt time has been refreshed and the job has been saved.

PreviousPriorityNextSetShouldSaveResult

Last updated 10 months ago

Was this helpful?