lego-monitoring/src/lego_monitoring/checks/remind.py
2025-06-06 15:38:48 +03:00

13 lines
406 B
Python

from typing import Coroutine
from lego_monitoring.alerting.alert import Alert
from lego_monitoring.core.checkers import BaseChecker
def remind_check(checkers: list[Coroutine | BaseChecker]) -> list[Alert]:
alerts = []
for c in checkers:
if not isinstance(c, BaseChecker) or not c.persistent or not c.remind:
continue
alerts.extend(c.current_alerts)
return alerts