fairdm.contrib.contributors.tasks#
Celery tasks that sync contributors with ORCID and ROR and look for duplicates.
Module Contents#
Functions#
Fetch external data for a contributor identifier and store it on the contributor. |
|
Queue a sync for up to 100 ORCID and ROR identifiers whose contributor is unsynced or older than 7 days. |
|
Group people who share a lowercased, trimmed name. |
Data#
API#
- logger#
‘getLogger(…)’
- sync_contributor_identifier(identifier_pk: int) bool#
Fetch external data for a contributor identifier and store it on the contributor.
The ORCID or ROR API is chosen from the identifier’s type.
Args: identifier_pk: Primary key of the
ContributorIdentifier.Returns: True when the sync succeeded, False otherwise.
- refresh_all_contributors() int#
Queue a sync for up to 100 ORCID and ROR identifiers whose contributor is unsynced or older than 7 days.
Returns: The number of sync tasks queued.
- detect_duplicate_contributors() dict#
Group people who share a lowercased, trimmed name.
Returns: A dict with
groups_foundandtotal_duplicates.