7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# File 'app/jobs/ingest_local_file_job.rb', line 7
def perform(file_set, path, user)
file_set.label ||= File.basename(path)
actor = Hyrax::Actors::FileSetActor.new(file_set, user)
if actor.create_content(File.open(path))
Hyrax.config.callback.run(:after_import_local_file_success, file_set, user, path)
else
Hyrax.config.callback.run(:after_import_local_file_failure, file_set, user, path)
end
rescue SystemCallError
Hyrax.config.callback.run(:after_import_local_file_failure, file_set, user, path)
end
|