-
Notifications
You must be signed in to change notification settings - Fork 58
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 auto_calculate_deadline
attribute to Scheduler
#3869
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 tasks
ammar92
approved these changes
Nov 26, 2024
Checklist for QA:
What works:Seems to work, will test better with PR #3840. The onboarding works and a scheduled report runs every minute when the cron is adjusted. What doesn't work:n/a Bug or feature?:n/a |
Quality Gate failedFailed conditions |
underdarknl
approved these changes
Nov 27, 2024
jpbruinsslot
added a commit
that referenced
this pull request
Nov 27, 2024
* main: Increase max number of PostgreSQL connections (#3889) Fix for task id as valid UUID (#3744) Add `auto_calculate_deadline` attribute to Scheduler (#3869) Ignore specific url parameters when following location headers (#3856) Let mailserver inherit l1 (#3704) Change plugins enabling in report flow to checkboxes (#3747) Fix rocky katalogus tests and delete unused fixtures (#3884) Enable/disable scheduled reports (#3871)
jpbruinsslot
added a commit
that referenced
this pull request
Nov 27, 2024
* main: (60 commits) Increase max number of PostgreSQL connections (#3889) Fix for task id as valid UUID (#3744) Add `auto_calculate_deadline` attribute to Scheduler (#3869) Ignore specific url parameters when following location headers (#3856) Let mailserver inherit l1 (#3704) Change plugins enabling in report flow to checkboxes (#3747) Fix rocky katalogus tests and delete unused fixtures (#3884) Enable/disable scheduled reports (#3871) optimize locking in katalogus.py, reuse available data (#3752) Updates boefje clearances and descriptions (#3863) Fixes for empty tables (#3844) Fix cron for last day of the month (#3831) Sub reports for Aggregate Report (#3852) Add start time to scheduled reports (#3809) Add configuration setting for number of octopoes workers (#3796) Limit requesting prior tasks for ranking in scheduler (#3836) Let local plugins (files) take precedence over database entries (#3858) Skip empty queues in the Rocky worker (#3860) Report types listed in a modal @ report plugins (#3718) Support a Schedule without a schedule in scheduler (#3834) ...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
Added attribute
auto_calculate_deadline
attribute to theScheduler
class, it allows us to specify if a scheduler (boefje, normalizer, report) needs to calculate the deadline automatically (even when a schedule isn't present). For instance we calculate the next deadline of a boefje task based on the grace period and a random jitter. This is something that we don't want for the normalizer, or reporting scheduler.Currently a report task gets rescheduled when
schedule
(cron) is specifically set to None. For the report scheduler we want to have tasks only be rescheduled when explicitly a schedule (cron expression) is provided. This is normal behaviour of a BoefjeScheduler, a tasks gets rescheduled daily when it hasn't gotten a schedule from which the ReportScheduler is derived.Issue link
Closes #3868
QA notes
Best to QA this with the functionality from #3840 where you can scheduler a report with a recurrence of one, and then make sure that the deadline timestamp stays the same when the report has been executed.
Code Checklist
.env
changes files if required and changed the.env-dist
accordingly.Checklist for code reviewers:
Copy-paste the checklist from the docs/source/templates folder into your comment.
Checklist for QA:
Copy-paste the checklist from the docs/source/templates folder into your comment.