netbox/docs/plugins
Alexander Haase 4bba92617d
Closes #16971: Add system jobs (#17716)
* Fix check for existing jobs

If a job is to be enqueued once and no specific scheduled time is
specified, any scheduled time of existing jobs will be valid. Only if a
specific scheduled time is specified for 'enqueue_once()' can it be
evaluated.

* Allow system jobs to be registered

A new registry key allows background system jobs to be registered and
automatically scheduled when rqworker starts.

* Test scheduling of system jobs

* Fix plugins scheduled job documentation

The documentation reflected a non-production state of the JobRunner
framework left over from development. Now a more practical example
demonstrates the usage.

* Allow plugins to register system jobs

* Rename system job metadata

To clarify which meta-attributes belong to system jobs, each of them is
now prefixed with 'system_'.

* Add predefined job interval choices

* Remove 'system_enabled' JobRunner attribute

Previously, the 'system_enabled' attribute was used to control whether a
job should run or not. However, this can also be accomplished by
evaluating the job's interval.

* Fix test

* Use a decorator to register system jobs

* Specify interval when registering system job

* Update documentation

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-11-01 14:56:08 -04:00
..
development Closes #16971: Add system jobs (#17716) 2024-11-01 14:56:08 -04:00
index.md Closes #10696: Break out instructions for installing & removing plugins (#15757) 2024-04-17 11:58:14 -04:00
installation.md Closes #10696: Break out instructions for installing & removing plugins (#15757) 2024-04-17 11:58:14 -04:00
removal.md Updated the documentation section about removing plugins 2024-06-30 15:08:11 -04:00