Move criterion for selecting preferred event from `gwcelery.tasks.gracedb` to `gwcelery.tasks.superevents`
The criterion for selecting the new preferred event is in gwcelery.tasks.gracedb.set_preferred_event
:
if r_new_event['far'] < r_preferred_event['far']:
client.updateSuperevent(sid, preferred_event=r_new_event['graceid'])
This should be in gwcelery.tasks.superevents
.