Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Response Ops][Alerting] Removing second call to load rule at end of …
…rule execution (elastic#192402) Resolves elastic#192396 ## Summary Removes second call to load rule at the end of the rule execution. This call was meant to get any changes to the rule schedule that users may have initiated during rule execution but there is a lot of overhead in loading a rule and any changes to the schedule would be captured during the next execution anyway. ## To Verify 1. Add some logging and a delay to rule execution after the initial rule load: ``` --- a/x-pack/plugins/alerting/server/task_runner/task_runner.ts +++ b/x-pack/plugins/alerting/server/task_runner/task_runner.ts @@ -684,6 +684,10 @@ export class TaskRunner< schedule = asErr(err); } + this.logger.info(`STARTING RULE EXECUTION`); + + await new Promise((r) => setTimeout(r, 30000)); + await withAlertingSpan('alerting:process-run-results-and-update-rule', () => ``` 2. Start Kibana and create a rule with a schedule of 3 minutes. 3. Wait for the rule to run and log, then change the schedule interval to something else. 4. The next execution of the rule should still occur 3 minutes later, and then further executions should occur on the new schedule.
- Loading branch information