Sha256: 8cd53ba6acfe7c47848cc60eff87cbe6088c25d562d38e9fcfef7e6f89963b87
Contents?: true
Size: 622 Bytes
Versions: 37
Compression:
Stored size: 622 Bytes
Contents
class IngestLocalFileJob < ActiveJob::Base queue_as CurationConcerns.config.ingest_queue_name # @param [FileSet] file_set # @param [String] path # @param [User] user def perform(file_set, path, user) file_set.label ||= File.basename(path) actor = CurationConcerns::Actors::FileSetActor.new(file_set, user) if actor.create_content(File.open(path)) FileUtils.rm(path) CurationConcerns.config.callback.run(:after_import_local_file_success, file_set, user, path) else CurationConcerns.config.callback.run(:after_import_local_file_failure, file_set, user, path) end end end
Version data entries
37 entries across 37 versions & 1 rubygems