Class: Bulkrax::DownloadCloudFileJob
- Inherits:
-
ApplicationJob
- Object
- ActiveJob::Base
- ApplicationJob
- Bulkrax::DownloadCloudFileJob
- Defined in:
- app/jobs/bulkrax/download_cloud_file_job.rb
Instance Method Summary collapse
-
#perform(file, target_file) ⇒ Object
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.
Instance Method Details
#perform(file, target_file) ⇒ Object
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
10 11 12 13 14 15 16 |
# File 'app/jobs/bulkrax/download_cloud_file_job.rb', line 10 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 |