-
Notifications
You must be signed in to change notification settings - Fork 11
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
d8f1fc5
commit 0c15790
Showing
21 changed files
with
223 additions
and
59 deletions.
There are no files selected for viewing
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
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
20 changes: 12 additions & 8 deletions
20
gitbook/docs/managing-jobs/manually-working/repeatevery-2.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
17 changes: 7 additions & 10 deletions
17
gitbook/docs/managing-jobs/manually-working/repeatevery-3.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
17 changes: 10 additions & 7 deletions
17
gitbook/docs/managing-jobs/manually-working/repeatevery-4.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
20 changes: 8 additions & 12 deletions
20
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
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
46 changes: 46 additions & 0 deletions
46
gitbook/docs/managing-jobs/manually-working/repeatevery-7.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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Run | ||
|
||
|
||
|
||
## `job.run()` | ||
|
||
{% hint style="info" %} | ||
The `run` method executes the processing logic defined for a specific job, handling lifecycle events and managing job state updates based on execution results. It's designed to be an internal method that drives the main execution flow of jobs within the system. | ||
|
||
\ | ||
**Normally you never need to call this manually.** | ||
{% endhint %} | ||
|
||
### Example Usage | ||
|
||
{% code fullWidth="false" %} | ||
```typescript | ||
const job = pulse.create('test', {}); | ||
job.run() | ||
.then(() => console.log('Job execution completed.')) | ||
.catch(error => console.error('Job execution failed:', error)); | ||
``` | ||
{% endcode %} | ||
|
||
### Parameters | ||
|
||
|
||
|
||
\ | ||
|
||
|
||
### Returns | ||
|
||
* **`Promise<Job>`**: A promise that resolves with the job instance after execution, whether successful or not. This method handles both successful completion and errors internally, ensuring the job's state is updated accordingly. | ||
|
||
\ | ||
|
||
|
||
\ | ||
|
||
|
||
\ | ||
|
||
|
||
|
||
|
45 changes: 45 additions & 0 deletions
45
gitbook/docs/managing-jobs/manually-working/repeatevery-8.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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Disable | ||
|
||
|
||
|
||
## `job.disable()` | ||
|
||
{% hint style="info" %} | ||
The `disable` method sets a job's status to disabled, preventing it from being run by the job processing system. This is useful for temporarily halting a job's execution without permanently removing it from the job queue. | ||
|
||
\ | ||
_This does **NOT** save the job in the database. you must explicitly declare_ [_`save()`_](save.md)_if you want to save it_ | ||
{% endhint %} | ||
|
||
### Example Usage | ||
|
||
{% code fullWidth="false" %} | ||
```typescript | ||
const job = pulse.create('test', {}); | ||
job.disable(); | ||
job.save(); // If you want to save it | ||
``` | ||
{% endcode %} | ||
|
||
### Parameters | ||
|
||
|
||
|
||
\ | ||
|
||
|
||
### Returns | ||
|
||
* **`Job`**: Returns the job instance, allowing for method chaining. This facilitates further modifications to the job or chaining additional method calls. | ||
|
||
\ | ||
|
||
|
||
\ | ||
|
||
|
||
\ | ||
|
||
|
||
|
||
|
Oops, something went wrong.
0c15790
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pulse Test Report