app/controllers/concerns/create_dip.rb
# REVIEW: change/remove this when status.py is doing the updating
change/remove this when status.py is doing the updating
change / remove this when status . py is doing the updating
def update_dip(id, uuid)
    begin
      @dataset = Dlibhydra::Dataset.find(id)
    rescue => e
      handle_exception(e, "Unable to find dataset. Make sure Solr is running", "Dataset id: " + id)
      raise
    end
    @dip = @dataset.aips[0]
    dip_info = get_dip_details(uuid)
    if dip_info.empty?
      return ''
    else
      begin
        ingest_dip(dip_info['current_path'])
        dip_current_path(dip_info['current_path'])
        dip_uuid(dip_info['uuid'])
        dip_status(dip_info['status'])
        dip_size(dip_info['size'])
        dip_current_location(dip_info['current_location']) 
        dip_resource_uri(dip_info['resource_uri']) 
        dip_size(dip_info['size'])
        dip_origin_pipeline(dip_info['origin_pipeline'])
        save_dip
        'AIP updated with dissemination objects'
      rescue => e
        return ''
      end
    end
  end
def update_dip ( id , uuid ) begin @dataset = Dlibhydra :: Dataset . find ( id ) rescue => e handle_exception ( e , "Unable to find dataset. Make sure Solr is running" , "Dataset id: " + id ) raise end @dip = @dataset . aips [ 0 ] dip_info = get_dip_details ( uuid ) if dip_info . empty? return '' else begin ingest_dip ( dip_info [ 'current_path' ] ) dip_current_path ( dip_info [ 'current_path' ] ) dip_uuid ( dip_info [ 'uuid' ] ) dip_status ( dip_info [ 'status' ] ) dip_size ( dip_info [ 'size' ] ) dip_current_location ( dip_info [ 'current_location' ] ) dip_resource_uri ( dip_info [ 'resource_uri' ] ) dip_size ( dip_info [ 'size' ] ) dip_origin_pipeline ( dip_info [ 'origin_pipeline' ] ) save_dip 'AIP updated with dissemination objects' rescue => e return '' end end end
REVIEW: change/remove this when status.py is doing the updating
REVIEW : change / remove this when status . py is doing the updating
# if dip_info is empty, there was probably an error getting the dip details so just return # api location # api uri # ingest dip failed so just return
id
<not_specific>
uuid
<not_specific>