From a2a576352dde33776eb6232a957898de066e7887 Mon Sep 17 00:00:00 2001 From: Stelios Voutsinas Date: Thu, 12 Oct 2023 22:02:06 +0300 Subject: [PATCH] Change alerting strategy --- gdmp_benchmark/gdmp_benchmark.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gdmp_benchmark/gdmp_benchmark.py b/gdmp_benchmark/gdmp_benchmark.py index 8725f5c..dfedc88 100644 --- a/gdmp_benchmark/gdmp_benchmark.py +++ b/gdmp_benchmark/gdmp_benchmark.py @@ -295,9 +295,7 @@ def send_http(msg: str, url: str): "Failed to send message. Status code: %s", response.status_code ) - def send_alert( - self, content: list, alert_strategy: AlertStrategies.SLOW_AND_ERROR - ) -> None: + def send_alert(self, content: list, alert_strategy: AlertStrategies) -> None: """Send an alert""" for test in content: if test.result in ALERT_STRATEGIES_MAP.get( @@ -986,7 +984,7 @@ def main(args: List[str] = None): if alerter is not None: alerter.send_alert( - content=results, alert_strategy=AlertStrategies.SLOW_AND_ERROR + content=results, alert_strategy=AlertStrategies.ONLY_ON_ERROR ) pprint(results)