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

Version Path
curation_concerns-1.7.8 app/jobs/ingest_local_file_job.rb
curation_concerns-1.7.7 app/jobs/ingest_local_file_job.rb
curation_concerns-2.0.0 app/jobs/ingest_local_file_job.rb
curation_concerns-2.0.0.rc2 app/jobs/ingest_local_file_job.rb
curation_concerns-1.7.6 app/jobs/ingest_local_file_job.rb
curation_concerns-1.7.5 app/jobs/ingest_local_file_job.rb
curation_concerns-1.7.4 app/jobs/ingest_local_file_job.rb
curation_concerns-1.7.3 app/jobs/ingest_local_file_job.rb
curation_concerns-1.7.2 app/jobs/ingest_local_file_job.rb
curation_concerns-2.0.0.rc1 app/jobs/ingest_local_file_job.rb
curation_concerns-1.7.1 app/jobs/ingest_local_file_job.rb
curation_concerns-1.7.0 app/jobs/ingest_local_file_job.rb
curation_concerns-1.7.0.beta1 app/jobs/ingest_local_file_job.rb
curation_concerns-1.6.3 app/jobs/ingest_local_file_job.rb
curation_concerns-1.6.2 app/jobs/ingest_local_file_job.rb
curation_concerns-1.6.1 app/jobs/ingest_local_file_job.rb
curation_concerns-1.6.0 app/jobs/ingest_local_file_job.rb
curation_concerns-1.5.0 app/jobs/ingest_local_file_job.rb
curation_concerns-1.4.0 app/jobs/ingest_local_file_job.rb
curation_concerns-1.3.3 app/jobs/ingest_local_file_job.rb