Log message in grace DB from "send_update_gcn():" report has been queued a preliminary alert.
The web interface for sending update state in graceDB that a preliminary alert has been triggered instead of an update notice.
'User {} queued a Preliminary alert through the dashboard.'
should be changed to
'User {} queued an update notice through the dashboard.'
It would also be useful to know (if it make sense and does not generate more confusion) to report the key values used.
@app.route('/send_update_gcn', methods=['POST'])
def send_update_gcn():
keys = ('superevent_id', 'skymap_filename',
'em_bright_filename', 'p_astro_filename')
superevent_id, *_ = args = tuple(request.form.get(key) for key in keys)
if all(args):
app.logger.info(
'Calling update_alert%r', args)
(
gracedb.upload.s(
None, None, superevent_id,
'User {} queued a Preliminary alert through the dashboard.'
.format(request.remote_user or '(unknown)'),
tags=['em_follow'])
|
orchestrator.update_alert.si(*args)
).delay()
flash('Queued update alert for {}.'.format(superevent_id), 'success')
else:
flash('No alert sent. Please fill in all fields.', 'danger')
return redirect(url_for('index'))