Skip to content
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

Change alerting strategy #51

Merged
merged 1 commit into from
Oct 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions gdmp_benchmark/gdmp_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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)
Expand Down