19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'app/controllers/hybridge/ingest_controller.rb', line 19
def perform
if params[:package_id].nil?
flash[:error] = "Unable to find selected file in source directory. Please contact your System Administrator"
else
params[:package_id].each do | package |
package_location = staged!(File.join(location, package))
next if package_location.nil?
collection_id = params[:collection_id][package]
Hybridge::IngestPackageJob.perform_later(package_location, collection_id, current_user)
end
flash[:notice] = "Successfully started the ingest process. This can take awhile"
end
redirect_to hybridge.root_path
end
|