-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Job.clean() not called #17685
Comments
@alehaa could you please elaborate on your steps to reproduce above? It is not clear exactly what you're doing. Example code would be helpful. |
During the implementation of #16971, I tested whether NetBox would raise exceptions on incorrectly configured jobs, and whether separate tests needed to be added to the system job registration. I added this (abbreviated) code to NetBox: class SampleJob(JobRunner):
def run(self, *args, **kwargs):
pass
SampleJob.enqueue_once(interval=0) The job can be scheduled without error. However, this should fail for two reasons:
As this is not a cause of system jobs (#16971), but the |
This is a reminder that additional information is needed in order to further triage this issue. If the requested details are not provided, the issue will soon be closed automatically. |
@jeremystretch Did you have a chance to review the additional information above? |
@alehaa pk, I'll flag this for an owner, unless you'd like to take it? |
I can provide a PR. As this is a fix for existing functionality I assume |
@alehaa great, thanks! And yeah, |
Deployment Type
Self-hosted
NetBox Version
v4.1.3
Python Version
3.11
Steps to Reproduce
JobRunner
.enqueue(interval=0)
.Expected Behavior
Getting a
ValidationError
:Observed Behavior
Nothing happens, as neither
Job.enqueue()
,Job.start()
norJob.terminate()
triggerJob.clean()
.The text was updated successfully, but these errors were encountered: