Commit 5313297b authored by Patrick Godwin's avatar Patrick Godwin
Browse files

superevents.py: prioritize label_added lvalert messages over others

parent 797c40f6
......@@ -59,6 +59,7 @@ def handle(payload):
if alert_type == 'label_added':
label = payload['data']['name']
group = payload['object']['group'].lower()
priority = 0
if label == 'EM_COINC':
# FIXME: Add RAVEN preliminary alert
log.info('Label %s added to %s', label, gid)
......@@ -66,8 +67,10 @@ def handle(payload):
return
elif alert_type != 'new':
return
else:
priority = 1
process.delay(payload)
process.apply_async(args=[payload], priority=priority)
@gracedb.task(queue='superevent', shared=False)
......
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