Skip to content

update-scixid celery workers will encounter an uncaught exception when a SciX id has been assigned to an identical record with a different ADS Bibcode #210

@seasidesparrow

Description

@seasidesparrow

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):

Metadata

Metadata

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions