From 875c8c7059cf5adb556f5745f70ecadd0b7c3256 Mon Sep 17 00:00:00 2001 From: Ali Behjati Date: Fri, 28 Nov 2025 18:14:50 +0100 Subject: [PATCH] fix: revert event dispatch behaviour --- pyproject.toml | 2 +- pyth_observer/dispatch.py | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 4fdc6d8..8aa6ea5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ ignore_missing_imports = true [tool.poetry] name = "pyth-observer" -version = "3.0.1" +version = "3.0.2" description = "Alerts and stuff" authors = [] readme = "README.md" diff --git a/pyth_observer/dispatch.py b/pyth_observer/dispatch.py index 698e5b4..0566586 100644 --- a/pyth_observer/dispatch.py +++ b/pyth_observer/dispatch.py @@ -235,13 +235,7 @@ async def process_zenduty_events(self, current_time: datetime) -> None: info["last_window_failures"] is not None and info["last_window_failures"] <= resolution_threshold ) - # Check if current window has low failures (and alert was previously sent) - current_window_resolved = ( - info["sent"] - and info["failures"] <= resolution_threshold - and info["failures"] < alert_threshold - ) - if last_window_resolved or current_window_resolved: + if last_window_resolved: logger.debug(f"Resolving Zenduty alert {identifier}") resolved = True