Skip to content
Snippets Groups Projects

Reenable combined sky maps now using multi-ordering

Compare and
7 files
+ 179
55
Compare changes
  • Side-by-side
  • Inline
Files
7
+ 11
4
@@ -59,7 +59,8 @@ def _create_base_alert_dict(classification, superevent, alert_type,
@gracedb.task(shared=False)
def _add_external_coinc_to_alert(alert_dict, superevent):
def _add_external_coinc_to_alert(alert_dict, superevent,
combined_skymap_filename):
external_event = gracedb.get_event(superevent['em_type'])
alert_dict['external_coinc'] = {
@@ -74,6 +75,10 @@ def _add_external_coinc_to_alert(alert_dict, superevent):
'time_sky_position_coincidence_far': superevent['space_coinc_far']
}
if combined_skymap_filename:
alert_dict['external_coinc']['combined_skymap_filename'] = \
combined_skymap_filename
return alert_dict
@@ -131,7 +136,7 @@ def _send(self, alert_dict, skymap, brokerhost):
@app.task(bind=True, ignore_result=True, queue='kafka', shared=False)
def send(self, skymap_and_classification, superevent, alert_type,
raven_coinc=False):
raven_coinc=False, combined_skymap_filename=None):
"""Send an public alert to all currently connected kafka brokers.
Parameters
@@ -168,7 +173,8 @@ def send(self, skymap_and_classification, superevent, alert_type,
if raven_coinc and alert_type != 'retraction':
canvas = (
_add_external_coinc_to_alert.s(alert_dict, superevent)
_add_external_coinc_to_alert.s(alert_dict, superevent,
combined_skymap_filename)
|
group(
(
@@ -199,7 +205,8 @@ def _create_skymap_classification_tuple(skymap, classification):
@app.task(shared=False, ignore_result=True)
def download_skymap_and_send_alert(classification, superevent, alert_type,
skymap_filename=None, raven_coinc=False):
skymap_filename=None, raven_coinc=False,
combined_skymap_filename=False):
"""Wrapper for send function when caller has not already downloaded the
skymap.
Loading