JasonD28 commented on a change in pull request #10605:
URL:
https://github.com/apache/incubator-superset/pull/10605#discussion_r479565854
##########
File path: superset/tasks/schedules.py
##########
@@ -705,6 +722,21 @@ def run_alert_query(
)
db.session.commit()
+
+def validate_observations(alert_id: int, label: str) -> Optional[str]:
+ """
+ Runs an alert's validators to check if it should be triggered or not
+ If so, return the name of the validator that returned true
+ """
+
+ logger.info("Validating observations for alert <%s:%s>", alert_id, label)
+
+ alert = db.session.query(Alert).get(alert_id)
+ for validator in alert.alert_validators:
Review comment:
currently yes
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]