mirror of
https://github.com/ansible/awx.git
synced 2026-05-12 20:07:37 -02:30
Add webhook notification backend
This commit is contained in:
@@ -39,8 +39,9 @@ class HipChatBackend(BaseEmailBackend):
|
||||
"notify": self.notify,
|
||||
"from": m.from_email,
|
||||
"message_format": "text"})
|
||||
if r.status_code != 204 and not self.fail_silently:
|
||||
if r.status_code != 204:
|
||||
logger.error("Error sending messages: {}".format(r.text))
|
||||
raise Exception("Error sending message to hipchat: {}".format(r.text))
|
||||
sent_messages += 1
|
||||
if not self.fail_silently:
|
||||
raise Exception("Error sending message to hipchat: {}".format(r.text))
|
||||
sent_messages += 1
|
||||
return sent_messages
|
||||
|
||||
Reference in New Issue
Block a user