Commit 768a8cff authored by Tanner Prestegard's avatar Tanner Prestegard Committed by gracedb-dev1
Browse files

adding switch in Django settings to facilitate turning off XMPP alerts

parent c57dcd69
......@@ -287,6 +287,13 @@ def issuePhoneAlert(event):
def issueXMPPAlert(event, location, alert_type="new", description="", serialized_object=None):
# Check settings switch for turning off XMPP alerts
if not settings.SEND_XMPP_ALERTS:
log.debug(("XMPP alert type '{atype}' for event {gid} not sent "
"because XMPP alerts are turned off").format(
atype=alert_type, gid=event.graceid()))
return
nodename = "%s_%s" % (event.group.name, event.pipeline.name)
nodename = nodename.lower()
nodenames = [ nodename, ]
......
......@@ -43,6 +43,8 @@ USE_LVALERT_OVERSEER = True
LVALERT_OVERSEER_PORTS = {
'lvalert.cgca.uwm.edu': 8000,
}
# Set to false to prevent XMPP alerts from being sent out
SEND_XMPP_ALERTS = True
EMBB_MAIL_ADDRESS = 'embb@gracedb.ligo.org'
EMBB_SMTP_SERVER = 'localhost'
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment