Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closes #16971: Add system jobs #17716

Open
wants to merge 7 commits into
base: feature
Choose a base branch
from

Conversation

alehaa
Copy link
Contributor

@alehaa alehaa commented Oct 9, 2024

Fixes: #16971

This PR allows the NetBox core and plugins to register job runners as system jobs. These are automatically scheduled without UI interaction, just before the worker process starts. This allows job runners to be used for housekeeping and synchronization tasks in future commits.

@jeremystretch
Copy link
Member

@alehaa I think we might have jumped the gun a bit on FR #16971: Because this is introducing a new plugin capability, it needs to be tagged for a minor release. (We can't ship any changes to the plugins API in a patch release.) I have no issue tagging for v4.2 though. Are okay with rebasing this against the feature branch? It shouldn't present much conflict.

@alehaa
Copy link
Contributor Author

alehaa commented Oct 11, 2024

That's fine by me. Do you initiate the rebase or do I have to do it locally and submit a new PR?

@jeremystretch
Copy link
Member

I should be able to tackle the rebase, just wanted to give you a heads up.

@jeremystretch jeremystretch force-pushed the 16971-housekeeping branch 2 times, most recently from bf88f18 to 5b61d14 Compare October 11, 2024 15:28
@jeremystretch jeremystretch changed the base branch from develop to feature October 11, 2024 15:29
@jeremystretch jeremystretch added this to the v4.2 milestone Oct 11, 2024
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.
A new registry key allows background system jobs to be registered and
automatically scheduled when rqworker starts.
The documentation reflected a non-production state of the JobRunner
framework left over from development. Now a more practical example
demonstrates the usage.
To clarify which meta-attributes belong to system jobs, each of them is
now prefixed with 'system_'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow plugin authors to register housekeeping tasks
2 participants