Sha256: 68075652af72efe873a8aff675d0d913cf835d0bd54355006c1a853e0bcd065f

Contents?: true

Size: 654 Bytes

Versions: 4

Compression:

Stored size: 654 Bytes

Contents

# frozen_string_literal: true

module Bulkrax
  class DownloadCloudFileJob < ApplicationJob
    queue_as Bulkrax.config.ingest_queue_name

    # Retrieve cloud file and write to the imports directory
    # Note: if using the file system, the mounted directory in
    #   browse_everything MUST be shared by web and worker servers
    def perform(file, target_file)
      retriever = BrowseEverything::Retriever.new
      retriever.download(file, target_file) do |filename, retrieved, total|
        # The block is still useful for showing progress, but the
        # first argument is the filename instead of a chunk of data.
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
bulkrax-7.0.0 app/jobs/bulkrax/download_cloud_file_job.rb
bulkrax-5.5.1 app/jobs/bulkrax/download_cloud_file_job.rb
bulkrax-5.4.2 app/jobs/bulkrax/download_cloud_file_job.rb
bulkrax-5.3.1 app/jobs/bulkrax/download_cloud_file_job.rb