Beispiel #1
0
def montysolr_targets():
    targets = make_targets(
           'CitationQuery:get_citation_dict', get_citation_dict,
           'InvenioQuery:perform_request_search_ints', perform_request_search_ints,
           'InvenioQuery:perform_request_search_bitset', perform_request_search_bitset,
           'InvenioFormatter:format_search_results', format_search_results,
           'InvenioKeepRecidUpdated:get_recids_changes', get_recids_changes,
           'InvenioKeepRecidUpdated:get_astro_changes', get_astro_changes,
           'InvenioKeepRecidUpdated:get_astro_changes_short', get_astro_changes_short,
           'InvenioFormatter:sort_and_format', sort_and_format,
           'Invenio:diagnostic_test', diagnostic_test,
           '*:invenio_search', invenio_search,
           )

    num_cpus = 0
    global api_calls
    # start multiprocessing with that many processes in the pool
    if str(config.MONTYSOLR_MAX_WORKERS) == '-1':
        num_cpus = multi_api_calls.start_multiprocessing(None) # detect no of cpus automatically
    elif int(config.MONTYSOLR_MAX_WORKERS) > 1:
        num_cpus = multi_api_calls.start_multiprocessing(int(config.MONTYSOLR_MAX_WORKERS))
    
    if num_cpus > 1:
        api_calls = multi_api_calls # swap the providers
    return targets
Beispiel #2
0
def montysolr_targets():
    return make_targets("InvenioQuery:fake_search", fake_search,
                        "InvenioQuery:fake_search_intbitset", fake_search_intbitset,
                        fake_search=fake_search,
                        index_docs=index_docs,
                        
                        )
Beispiel #3
0
def montysolr_targets():
    return make_targets("MyInvenioKeepRecidUpdated:get_recids_changes", targets.get_recids_changes, # register for the Java unittest
                        get_astro_changes=targets.get_astro_changes,
                        change_records=change_records,
                        reset_records=reset_records,
                        add_records=add_records,
                        create_delete=create_delete,
                        wipeout_record=wipeout_record,
                        create_record=create_record,
                        delete_record=delete_record,
                        
                        )
Beispiel #4
0
def montysolr_targets():
    return make_targets(
                        "PythonTextField:get_field_value", get_field_value,
                        )
Beispiel #5
0
def montysolr_targets():
    targets = make_targets(
           '*:parse_human_name', parse_human_name,
           )
    
    return targets
Beispiel #6
0
def montysolr_targets():
    return make_targets(receive_text=receive_text,
                        receive_text_array=receive_text_array,
                        receive_field_value=receive_field_value,
                        handleRequestBody=handle_request_body)
Beispiel #7
0
def montysolr_targets():
    return make_targets(fill_newseman_dictionary=fill_newseman_dictionary,
                        )
Beispiel #8
0
def montysolr_targets():
    targets = make_targets(bigtest=bigtest, bigtest_www=bigtest_www);
    return targets
Beispiel #9
0
def montysolr_targets():
    targets = make_targets('MockInvenioKeepRecidUpdated:get_changed_recids_mock', get_changed_recids_mock, 
                           '*:set_changed_recids_mock', set_changed_recids_mock,
           )
    return targets
Beispiel #10
0
def montysolr_targets():
    return make_targets("PythonTextField:get_field_value", get_field_value,
                        "PythonTextField:arxiv_field_value", arxiv_field_value,
                        "PythonTextField:get_bibrec_bibdoc", get_bibrec_bibdoc,
                        )
Beispiel #11
0
def montysolr_targets():
    return make_targets("newseman.SemanticTagger:translate_tokens", translate_tokens,
                        "newseman.SemanticTagger:initialize_seman", initialize_seman,
                        initialize_seman=initialize_seman,
                        translate_tokens=translate_tokens,
                        configure_seman=configure_seman)
Beispiel #12
0
def montysolr_targets():
    return make_targets("PythonTextField:get_field_value_using_bibcode", get_field_value_using_bibcode,
                        )