Skip to content

Commit

Permalink
feat: add firing of delayed notification rules
Browse files Browse the repository at this point in the history
  • Loading branch information
sbgap committed Jun 10, 2024
1 parent bdf2dcd commit 2e37dcf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions alertaclient/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,9 @@ def escalate(self):
def reactivate_notification_rules(self):
self.http.session.get(self.http.endpoint + '/notificationrules/reactivate', auth=self.http.auth, timeout=self.http.timeout)

def fire_delayed_notifications(self):
self.http.session.get(self.http.endpoint + '/notificationdelay/fire', auth=self.http.auth, timeout=self.http.timeout)


class ApiKeyAuth(AuthBase):

Expand Down
9 changes: 9 additions & 0 deletions alertaclient/commands/cmd_notfication_delay.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import click


@click.command('fire_delayed_notifications', short_help='Fire delayed notifications')
@click.pass_obj
def cli(obj):
"""Firing delayed notification rules"""
client = obj['client']
client.fire_delayed_notifications()

0 comments on commit 2e37dcf

Please sign in to comment.