app/controllers/deposits_controller.rb
# given a number of pure records to refresh, or a number of days to refresh from, refresh the datasets from pure
given a number of pure records to refresh, or a number of days to refresh from, refresh the datasets from pure
given a number of pure records to refresh or a number of days to refresh from refresh the datasets from pure
def refresh_from_pure (refresh_num = nil, refresh_from = nil)
    num_datasets = get_number_of_results('has_model_ssim:"Dlibhydra::Dataset"')
    solr_response = nil
    unless num_datasets == 0
      solr_response = solr_query_short('has_model_ssim:"Dlibhydra::Dataset"','pure_uuid_tesim',num_datasets)
    end
    c = nil
    if refresh_num
      c = get_uuids(refresh_num)
      get_datasets_from_collection(c, solr_response)
    elsif refresh_from
      c = get_uuids_created_from_tonow(refresh_from)
      uuids = get_datasets_from_collection(c, solr_response)
      c = get_uuids_modified_from_tonow(refresh_from)
      get_datasets_from_collection(c, solr_response, uuids)
    else
      c = get_uuids
      get_datasets_from_collection(c, solr_response)
    end
    c.map{|x| x["uuid"]}
  end
def refresh_from_pure ( refresh_num = nil , refresh_from = nil ) num_datasets = get_number_of_results ( 'has_model_ssim:"Dlibhydra::Dataset"' ) solr_response = nil unless num_datasets == 0 solr_response = solr_query_short ( 'has_model_ssim:"Dlibhydra::Dataset"' , 'pure_uuid_tesim' , num_datasets ) end c = nil if refresh_num c = get_uuids ( refresh_num ) get_datasets_from_collection ( c , solr_response ) elsif refresh_from c = get_uuids_created_from_tonow ( refresh_from ) uuids = get_datasets_from_collection ( c , solr_response ) c = get_uuids_modified_from_tonow ( refresh_from ) get_datasets_from_collection ( c , solr_response , uuids ) else c = get_uuids get_datasets_from_collection ( c , solr_response ) end c . map { | x | x [ "uuid" ] } end
given a number of pure records to refresh, or a number of days to refresh from, refresh the datasets from pure
given a number of pure records to refresh or a number of days to refresh from refresh the datasets from pure
# Get number of results to return # Get all dataset records from Solr # uuids is a list of new datasets created after the solr query # these are used to ensure we don't create duplicates # return a list of all the refreshed pure records
refresh_num
<not_specific>
refresh_from
<not_specific>