Shorthand notify command

Notifications on API key update failures
Notifications on application status updates
Notifications on services disabled
This commit is contained in:
Adarnof
2016-02-17 22:30:43 +00:00
parent 1d3d1b53a4
commit 0807bc98a3
4 changed files with 50 additions and 9 deletions

View File

@@ -5,8 +5,8 @@ def notify(user, title, message=None, level='info'):
notif.user = user
notif.title = title
if not message:
message = Title
message = title
notif.message = message
notif.level = level
notif.save()
logger.info("Created notification %s" % notif
logger.info("Created notification %s" % notif)