Skip to content

Commit

Permalink
Respect alert service enabled field
Browse files Browse the repository at this point in the history
(cherry picked from commit c04330c)
  • Loading branch information
themylogin committed Apr 30, 2019
1 parent 1f84595 commit 0333434
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/middlewared/middlewared/plugins/alert.py
Expand Up @@ -294,7 +294,8 @@ async def send_alerts(self, job):
for policy_name, policy in self.policies.items():
gone_alerts, new_alerts = policy.receive_alerts(now, self.alerts)

for alert_service_desc in await self.middleware.call("datastore.query", "system.alertservice"):
for alert_service_desc in await self.middleware.call("datastore.query", "system.alertservice",
[["enabled", "=", True]]):
service_gone_alerts = [
alert for alert in gone_alerts
if (
Expand Down

0 comments on commit 0333434

Please sign in to comment.