Class: ImportExportJob

Inherits:
ActiveJob::Base
  • Object
show all
Includes:
Open3
Defined in:
app/jobs/import_export_job.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#modeObject (readonly)

Returns the value of attribute mode.



4
5
6
# File 'app/jobs/import_export_job.rb', line 4

def mode
  @mode
end

Instance Method Details

#perform(uri, options = {}) ⇒ Object

Notes:

* the Fedora import-export tool is not release yet
* current parameters are undergoing changes
* import features are not yet available
* exporting bags is not yet supported

Parameters:

  • uri (String)

    of the resource

  • opts (Hash)

    a customizable set of options



17
18
19
20
21
22
23
# File 'app/jobs/import_export_job.rb', line 17

def perform(uri, options = {})
  @mode = options.fetch(:mode, "export")
  call(uri,
       options.fetch(:desc_dir, CurationConcerns.config.descriptions_directory),
       options.fetch(:bin_dir, CurationConcerns.config.binaries_directory),
       options.fetch(:profile, nil))
end