-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Fixes #8366 - Add job scheduling #10417
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
Fixes #8366 - Add job scheduling #10417
Conversation
|
@kkthxbye-code thanks for taking this on. I wanted to note that since this has been tagged for v3.4, the PR should be based on the |
|
@jeremystretch - Thanks, didn't notice when I opened the PR that it was the wrong target branch, the actual branch was made off of feature though, so it shouldn't be an issue. I changed the target now :) |
Sync with upstream
* Added JobResult form filtersets * Change housekeeping cleanup delete from `_raw_delete` to `delete` to make sure scheduled tasks are cancelled * Change default sort of JobResult table to -created * Added `delete` override to `JobResult` to remove scheduled tasks from RQ when a JobResult is deleted * Updated js/css dist files. Will need to be redone when develop is merged to feature.
Done to avoid having deleted a task on accident if the deleting of the JobResult fails.
|
I think this is ready for initial review now @jeremystretch There's some stuff I'm unsure about:
I probably forgot some stuff, but let me know if something is not clear when testing. |
Can we just add a filter for the primary list?
Possibly; I'm happy to defer to feedback we receive during the beta cycle. |
jeremystretch
left a comment
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.
Awesome work @kkthxbye-code! A couple minor comments but overall this is excellent! Thanks for owning this.
It is already possible to filter by status in the JobResult view. We could add a menu item that links to the JobResult list with the status pre-filtered to Thank you for the review, I adressed what I could. Regarding the filtersets I'm gonna need some guidance. |
|
Awesome work @kkthxbye-code! 🙌 |
Fixes: #8366
This is a draft PR for adding job scheduling. Feel free to provide input.
Changes:
form-object-editclass to both forms to match the width of forms in the rest of netbox (previously they were full width)flatpickrdependency to fix issue with the DateTimeField automatically populating when losing focus.Scheduledscheduled_timeto JobResult modelTo do:
limit_choices_to=FeatureQuery('job_results'),doesn't work at all in filter forms and it doesn't seem to work in other filterforms either.