Skip to content

Commit

Permalink
adding a description for touch's argument
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey Moiseev authored and code-xhyun committed Jul 15, 2024
1 parent dbbf75c commit 540b8d6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ Pulse is a new fork of the [Agenda](https://github.com/agenda/agenda) project, c
| [enable.ts](https://github.com/pulsecron/pulse/blob/master/src/job/enable.ts) | Enable.ts activates a specific job type within the pulse project. By modifying an attribute in the Job object, it reverses the disabled status, allowing the job to run. This function integrates seamlessly with the wider repository structure, particularly the job module. |
| [is-running.ts](https://github.com/pulsecron/pulse/blob/master/src/job/is-running.ts) | Defines a function that determines if specific jobs within the application are currently running. It uses time comparisons, analyzing lastRunAt and lastFinishedAt properties, to deliver its verdict, thereby enhancing task management in the parent repository pulse. |
| [schedule.ts](https://github.com/pulsecron/pulse/blob/master/src/job/schedule.ts) | Schedule.ts in the job directory empowers a certain task to run at a predefined time. Using this feature, users can set either a specific date or a string pattern to determine the next execution instance of a job, thereby enhancing the scheduling capabilities in the overall Pulse project. |
| [touch.ts](https://github.com/pulsecron/pulse/blob/master/src/job/touch.ts) | Touch.ts within the job directory of the Pulse repository manages job concurrency. It updates a jobs lockedAt time, preventing multiple instances from running simultaneously. The function returns a Promise for the saved job. |
| [touch.ts](https://github.com/pulsecron/pulse/blob/master/src/job/touch.ts) | Touch.ts within the job directory of the Pulse repository manages job concurrency. It updates a jobs lockedAt time, preventing multiple instances from running simultaneously. Can have an optional progress parameter (0-100). The function returns a Promise for the saved job. |
| [compute-next-run-at.ts](https://github.com/pulsecron/pulse/blob/master/src/job/compute-next-run-at.ts) | <code>► INSERT-TEXT-HERE</code> |
| [to-json.ts](https://github.com/pulsecron/pulse/blob/master/src/job/to-json.ts) | Transforms job details into a storable JSON object within the repositorys job management module. Converts key date attributes into the Date data type, facilitating data interchange with MongoDB. |
| [repeat-at.ts](https://github.com/pulsecron/pulse/blob/master/src/job/repeat-at.ts) | RepeatAt is a functionality of the Job module that arranges a task repetition at a specific interval. It accepts human-readable or numeric time variables, thereby empowering developers to schedule tasks dynamically within the pulse project. |
Expand Down
4 changes: 2 additions & 2 deletions gitbook/docs/managing-jobs/manually-working/repeatevery-5.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@



## `job.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.
Expand All @@ -21,7 +21,7 @@ job.touch();

### Parameters


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

\

Expand Down

1 comment on commit 540b8d6

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines Statements Branches Functions
Coverage: 54%
56.8% (580/1021) 41.91% (127/303) 51.57% (82/159)

Pulse Test Report

Tests Skipped Failures Errors Time
63 0 💤 0 ❌ 0 🔥 9.076s ⏱️

Please sign in to comment.