Skip to content

Commit

Permalink
GITBOOK-42: No subject
Browse files Browse the repository at this point in the history
  • Loading branch information
code-xhyun authored and gitbook-bot committed Jul 15, 2024
1 parent 0c096c6 commit d13e6a4
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions gitbook/docs/managing-jobs/manually-working/repeatevery-5.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,25 @@
# Touch



## `job.touch(progress?)`

{% hint style="info" %}
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.


{% endhint %}

### Example Usage

{% code fullWidth="false" %}
```typescript
const job = pulse.create('test', {});
job.touch();
job.touch(10);
```
{% endcode %}

### Parameters

* **`progress`** (`number`): An optional argument that indicates progress value for the proceeding task.

\

* **`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.

\


\




0 comments on commit d13e6a4

Please sign in to comment.