Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Jonah Kanner
gracedb
Commits
768a8cff
Commit
768a8cff
authored
Jun 15, 2017
by
Tanner Prestegard
Committed by
gracedb-dev1
Jun 15, 2017
Browse files
adding switch in Django settings to facilitate turning off XMPP alerts
parent
c57dcd69
Changes
2
Hide whitespace changes
Inline
Side-by-side
gracedb/alert.py
View file @
768a8cff
...
...
@@ -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
,
]
...
...
settings/default.py
View file @
768a8cff
...
...
@@ -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'
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment