diff --git a/gracedb/management/commands/ingest_email.py b/gracedb/management/commands/ingest_email.py index d6539b90f6277653db7a8064389c72c7fc5f9ac0..e6bcff1974323ffcd4350953292af88a92a932b6 100644 --- a/gracedb/management/commands/ingest_email.py +++ b/gracedb/management/commands/ingest_email.py @@ -11,10 +11,10 @@ wierdchars = re.compile(u'[\U00010000-\U0010ffff]') def sendResponse(to, subject, message): msg = MIMEText(message) msg['To'] = to - msg['From'] = 'embb@losc-gracedb.ligo.org' + msg['From'] = 'embb@embb-dev.ligo.caltech.edu' msg['Subject'] = subject s = smtplib.SMTP('acrux.ligo.caltech.edu') - s.sendmail('embb@losc-gracedb.ligo.org', [to], msg.as_string()) + s.sendmail('embb@embb-dev.ligo.caltech.edu', [to], msg.as_string()) s.quit() return None @@ -69,8 +69,13 @@ class Command(BaseCommand): # look for the JSON field at the end of the mail - j = json.loads(dict['JSON']) - self.transcript += 'Found %d keys in JSON\n' % len(j.keys()) + try: + j = json.loads(dict['JSON']) + self.transcript += 'Found %d keys in JSON\n' % len(j.keys()) + except Exception, e: + self.transcript += 'Error: Cannot parse JSON: %s\n' % dict['JSON'] + self.transcript += str(e) + return sendResponse(dict['From'], dict['Subject'], self.transcript) graceid = getpop(j, 'graceid', None) try: diff --git a/settings/default.py b/settings/default.py index b727dcbb1a583382854cc46969feaf54a7fb472e..ad5e74b62c0bf23e0f7917d7f42bfd5d0252d867 100644 --- a/settings/default.py +++ b/settings/default.py @@ -40,7 +40,7 @@ XMPP_ALERT_CHANNELS = [ 'external_grb', ] -SKYMAP_VIEWER_SERVICE_URL = "https://losc-gracedb.ligo.org/cgi-bin/skymapViewer" +SKYMAP_VIEWER_SERVICE_URL = "https://embb-dev.ligo.caltech.edu/cgi-bin/skymapViewer" BLESSED_TAGS = [ 'analyst_comments', diff --git a/settings/roy.py b/settings/roy.py index 3ce1c007f3f51d21df7eadd777de94f05f9b72ce..d075d349118cb568504c03b1ece5eccef9191ff2 100644 --- a/settings/roy.py +++ b/settings/roy.py @@ -30,13 +30,13 @@ SKYMAP_VIEWER_MEDIA_URL = "/skymap-viewer/" GRACEDB_DATA_DIR = "/home/roywilliams/gracedbData" MPLCONFIGDIR = "/home/jkanner/mplconfig" -ALERT_EMAIL_FROM = "Dev Alert <root@losc-gracedb.ligo.org>" +ALERT_EMAIL_FROM = "Dev Alert <root@embb-dev.ligo.caltech.edu>" ALERT_EMAIL_TO = [ "Roy Williams <roy@caltech.edu>", ] ALERT_EMAIL_BCC = ["roy@caltech.edu"] -ALERT_TEST_EMAIL_FROM = "Dev Test Alert <root@losc-gracedb.ligo.org>" +ALERT_TEST_EMAIL_FROM = "Dev Test Alert <root@embb-dev.ligo.caltech.edu>" ALERT_TEST_EMAIL_TO = [ "Roy Williams <roy@caltech.edu>", ] diff --git a/templates/gracedb/event_detail.html b/templates/gracedb/event_detail.html index 5b55c0862035bdfb322f1375a7c56f81f2d1e141..c9232c1ebd49022dc2562bdaf68c499e98223079 100644 --- a/templates/gracedb/event_detail.html +++ b/templates/gracedb/event_detail.html @@ -629,7 +629,6 @@ {# Enable post to skymap viewer #} <div id="sV_form_div" style="display: none"> -<!-- <form action="https://losc-gracedb.ligo.org/cgi-bin/skymapViewer" id="sV_form" method="post"> --> <form action="{{ SKYMAP_VIEWER_SERVICE_URL }}" id="sV_form" method="post"> <input type="hidden" name="skymapid" value="{{ object.graceid }}"> <!-- <input type="hidden" name="json" value="{{ skymap_json }}"> -->