def safe_merger(): from invenio.bibauthorid_merge import merge_static from invenio.bibauthorid_rabbit import rabbit from invenio.bibauthorid_personid_maintenance import check_author_paper_associations \ , duplicated_tortoise_results_exist \ , merger_errors_exist \ , repair_author_paper_associations \ , back_up_author_paper_associations \ , compare_personids assert duplicated_tortoise_results_exist() if not check_author_paper_associations(): rabbit([]) repair_author_paper_associations() rabbit([]) assert check_author_paper_associations() back_up_author_paper_associations() merge_static() assert check_author_paper_associations() assert merger_errors_exist() compare_personids("/tmp/merge_diff")
def safe_merger(): from invenio.bibauthorid_merge import merge_static from invenio.bibauthorid_rabbit import rabbit from invenio.bibauthorid_personid_maintenance import check_personid_papers \ , check_results \ , check_merger \ , repair_personid \ , copy_personids \ , compare_personids assert check_results() if not check_personid_papers(): rabbit([]) repair_personid() rabbit([]) assert check_personid_papers() copy_personids() merge_static() assert check_personid_papers() assert check_merger() compare_personids("/tmp/merge_diff")