Skip to content

Commit 381f199

Browse files
committed
fix: revert event dispatch behaviour
1 parent d3ba34d commit 381f199

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ignore_missing_imports = true
44

55
[tool.poetry]
66
name = "pyth-observer"
7-
version = "3.0.1"
7+
version = "3.0.2"
88
description = "Alerts and stuff"
99
authors = []
1010
readme = "README.md"

pyth_observer/dispatch.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -235,13 +235,7 @@ async def process_zenduty_events(self, current_time: datetime) -> None:
235235
info["last_window_failures"] is not None
236236
and info["last_window_failures"] <= resolution_threshold
237237
)
238-
# Check if current window has low failures (and alert was previously sent)
239-
current_window_resolved = (
240-
info["sent"]
241-
and info["failures"] <= resolution_threshold
242-
and info["failures"] < alert_threshold
243-
)
244-
if last_window_resolved or current_window_resolved:
238+
if last_window_resolved:
245239
logger.debug(f"Resolving Zenduty alert {identifier}")
246240
resolved = True
247241

0 commit comments

Comments
 (0)