-
Notifications
You must be signed in to change notification settings - Fork 252
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
Add custom job intervals #2084
Add custom job intervals #2084
Conversation
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.
Looking good, thanks! Just need some clarifications.
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.
all changes have been made
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.
Looking great. Let's just get this tested and wrap it up, assuming my new comments aren't too much.
return schedules.crontab(minute=t.minute, hour=t.hour) | ||
elif self.interval == JobExecutionType.TYPE_WEEKLY: | ||
return schedules.crontab(minute=t.minute, hour=t.hour, day_of_week=t.weekday()) | ||
elif self.interval == JobExecutionType.TYPE_CUSTOM: | ||
return self.get_crontab(self.crontab) | ||
raise ValueError(f"I do not know to convert {self.interval} to a Cronjob!") |
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.
I think it would be good to add a housekeeping item to stash the crontab onto self.crontab
in all cases. Could clean up a lot of these methods.
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.
LGTM
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.
Thank you for adding the tests! I just have a couple minor asks and we're good to wrap this up!
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.
chef's kiss 👨🍳 💋 Thank you for your contribution! This is great!
thank you for the feedback. i learned a lot |
* next: (26 commits) Include relationships and associations on object REST APIs (nautobot#2092) Add release-note for nautobot#2116 Update Releases Batched for Next (next) (nautobot#2116) Re-ordered migrations Add release-note for nautobot#1226, nautobot#1739, nautobot#2115 Add custom job intervals (nautobot#2084) Implement Notes Model (nautobot#1984) Update Lock-file Patch Releases for Develop (nautobot#2115) update paginator to enforce max_page_size setting in web ui views (nautobot#2112) Add missing location status migration (nautobot#2100) update release-notes for issue nautobot#2060 added peer_id filter for relationship associations (nautobot#2113) Add release-note for nautobot#2025 Cleanup group names, manual approval for flake8 (nautobot#2025) updated documentations for nautobot#2109 and nautobot#2111 fixed one to many relationship source filter and apply AND operator between filters (nautobot#2111) Version bump to v1.3.10-beta.1, seeded next version in docs. Add release-note for nautobot#860, nautobot#1694, nautobot#2081. Update release date, version. Fix nautobot#2077 - handle case on object detail views where a relationship involves a non-installed model (nautobot#2078) Fix error raised if status connected not found when creating a cable (nautobot#2089) ... # Conflicts: # nautobot/circuits/api/serializers.py # nautobot/core/api/serializers.py # nautobot/dcim/api/serializers.py # nautobot/docs/development/best-practices.md # nautobot/docs/development/style-guide.md # nautobot/docs/release-notes/version-1.4.md # nautobot/extras/api/nested_serializers.py # nautobot/extras/api/relationships.py # nautobot/extras/api/serializers.py # nautobot/extras/tests/integration/test_notes.py # nautobot/extras/tests/test_api.py # nautobot/utilities/testing/api.py
Closes: #1226
What's Changed
Adds custom cron style interval for running jobs.
TODO