The generation of two or more bibcodes for the same record is a common enough occurrence that we devote some curation time to correcting these records. In ADS Classic, there is no prohibition against two records with some identical metadata from having different bibcodes. However, these instances will cause the celery worker for update-scixid to generate an exception of this form:
psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint \"records_scix_id_key\"\nDETAIL: Key (scix_id)=(scix:81SZ-CHN8-ARWQ) already exists.
Such records should generate an error that is passed to logger for the curators to review, but this should not cause the celery worker itself to fail. One possible fix is to simply wrap this section in a try-except block:
|
def task_update_scixid(bibcodes, flag): |