From 70ffe988dd10d32aea3a2a9236323a11cdfeaac0 Mon Sep 17 00:00:00 2001 From: Alexey Moiseev Date: Sun, 14 Jul 2024 00:39:42 +0200 Subject: [PATCH] adding a description for touch's argument --- README.md | 2 +- gitbook/docs/managing-jobs/manually-working/repeatevery-5.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9835662..af61f98 100644 --- a/README.md +++ b/README.md @@ -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) | ► INSERT-TEXT-HERE | | [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. | diff --git a/gitbook/docs/managing-jobs/manually-working/repeatevery-5.md b/gitbook/docs/managing-jobs/manually-working/repeatevery-5.md index 0cfabfe..1d805c8 100644 --- a/gitbook/docs/managing-jobs/manually-working/repeatevery-5.md +++ b/gitbook/docs/managing-jobs/manually-working/repeatevery-5.md @@ -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. @@ -21,7 +21,7 @@ job.touch(); ### Parameters - +* **`progress`** (`number`): An optional argument that indicates progress value for the proceeding task. \