Class: ImportExportJob

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

Instance Method Summary collapse

Instance Method Details

#perform(resource:, mode: 'export', dir: Hyrax.config.bagit_dir) ⇒ Object

TODO: Support BagIt profile

Parameters:

  • resource (String)

    uri of the resource

  • mode (String) (defaults to: 'export')

    “import” or “export” mode

  • dir (String) (defaults to: Hyrax.config.bagit_dir)

    location of export



10
11
12
13
# File 'app/jobs/import_export_job.rb', line 10

def perform(resource:, mode: 'export', dir: Hyrax.config.bagit_dir)
  command = "java -jar #{Hyrax.config.import_export_jar_file_path} --mode #{mode} --resource #{resource} --dir #{dir}"
  internal_call(command)
end