diff --git a/_data/facilities.yml b/_data/facilities.yml index 35f9e7a2a4d0ca6faa1004f268b871f538a07978..0de75ea3dd21214890b031a2c81030f95335e738 100644 --- a/_data/facilities.yml +++ b/_data/facilities.yml @@ -179,6 +179,7 @@ link: https://oai.panosc.ess.eu/openaire/oai last-check: 2024-12-22 status: Active + skip-harvesting: true items: count: 0 adminAddress: @@ -479,6 +480,7 @@ oai-pmh-endpoint: link: https://icatisis-prod.esc.rl.ac.uk/oaipmh/request status: Error + skip-harvesting: true last-check: 2024-12-22 adminAddress: - isisdata@stfc.ac.uk diff --git a/scripts/update_oai-pmh.rb b/scripts/update_oai-pmh.rb index 1e91caa5aedfec420f43c007e69e1f8840377143..0786cab60368f83ef495a2cf14d8fe270810b59d 100644 --- a/scripts/update_oai-pmh.rb +++ b/scripts/update_oai-pmh.rb @@ -340,7 +340,7 @@ def count_identifiers(endpoint, prefix) end -def query_oai_pmh_endpoint(endpoint) +def query_oai_pmh_endpoint(endpoint, do_harvesting) status, adminAddress = check_oai_pmh_endpoint(endpoint) if status == "Error" return status, [], {}, 0, {} @@ -355,6 +355,10 @@ def query_oai_pmh_endpoint(endpoint) set_names = list_sets(endpoint) + if !do_harvesting + return "Active", adminAddress, {}, 0, {} + end + begin total_count, set_counts = count_identifiers(endpoint, dc_prefix) rescue StandardError => e @@ -385,7 +389,8 @@ facilities.each do |facility| name = facility['short-name'] puts "Checking OAI-PMH endpoint for #{name}: #{oai_pmh_endpoint}" - status, adminAddress, set_names, total_count, set_count = query_oai_pmh_endpoint(oai_pmh_endpoint) + do_harvesting = !oai_pmh['skip-harvesting'] + status, adminAddress, set_names, total_count, set_count = query_oai_pmh_endpoint(oai_pmh_endpoint, do_harvesting) oai_pmh['status'] = status @@ -395,7 +400,7 @@ facilities.each do |facility| oai_pmh.delete('items') - if status == "Active" + if status == "Active" && do_harvesting items = {} oai_pmh['items'] = items items['count'] = total_count