-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up model & registry documentation
- Loading branch information
1 parent
76b584e
commit 6850c1a
Showing
6 changed files
with
134 additions
and
43 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
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,13 @@ | ||
# Background Jobs | ||
|
||
NetBox includes the ability to execute certain functions as background tasks. These include: | ||
|
||
* [Report](../customization/reports.md) execution | ||
* [Custom script](../customization/custom-scripts.md) execution | ||
* Synchronization of [remote data sources](../integrations/synchronized-data.md) | ||
|
||
Additionally, NetBox plugins can enqueue their own background tasks. This is accomplished using the [JobResult model](../models/extras/jobresult.md). Background tasks are executed by the `rqworker` process(es). | ||
|
||
## Scheduled Jobs | ||
|
||
Background jobs can be configured to run immediately, or at a set time in the future. Scheduled jobs can also be configured to repeat at a set interval. |
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,9 @@ | ||
# Synchronized Data | ||
|
||
Some NetBox models support automatic synchronization of certain attributes from remote [data sources](../models/core/datasource.md), such as a git repository hosted on GitHub or GitLab. Data from the authoritative remote source is synchronized locally in NetBox as [data files](../models/core/datafile.md). | ||
|
||
The following features support the use of synchronized data: | ||
|
||
* [Configuration templates](../features/configuration-rendering.md) | ||
* [Configuration context data](../features/context-data.md) | ||
* [Export templates](../customization/export-templates.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,54 @@ | ||
# Job Results | ||
|
||
The JobResult model is used to schedule and record the execution of [background tasks](../../features/background-jobs.md). | ||
|
||
## Fields | ||
|
||
### Name | ||
|
||
The name or other identifier of the NetBox object with which the job is associated. | ||
|
||
## Object Type | ||
|
||
The type of object (model) associated with this job. | ||
|
||
### Created | ||
|
||
The date and time at which the job itself was created. | ||
|
||
### Scheduled | ||
|
||
The date and time at which the job is/was scheduled to execute (if not submitted for immediate execution at the time of creation). | ||
|
||
### Interval | ||
|
||
The interval (in minutes) at which a scheduled job should re-execute. | ||
|
||
### Completed | ||
|
||
The date and time at which the job completed (if complete). | ||
|
||
### User | ||
|
||
The user who created the job. | ||
|
||
### Status | ||
|
||
The job's current status. Potential values include: | ||
|
||
| Value | Description | | ||
|-------|-------------| | ||
| Pending | Awaiting execution by an RQ worker process | | ||
| Scheduled | Scheduled for a future date/time | | ||
| Running | Currently executing | | ||
| Completed | Successfully completed | | ||
| Failed | The job did not complete successfully | | ||
| Errored | An unexpected error was encountered during execution | | ||
|
||
### Data | ||
|
||
Any data associated with the execution of the job, such as log output. | ||
|
||
### Job ID | ||
|
||
The job's UUID, used for unique identification within a queue. |
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