-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0c096c6
commit d13e6a4
Showing
1 changed file
with
2 additions
and
17 deletions.
There are no files selected for viewing
19 changes: 2 additions & 17 deletions
19
gitbook/docs/managing-jobs/manually-working/repeatevery-5.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
|
||
\ | ||
|
||
|
||
\ | ||
|
||
|
||
|
||
|