Class: BatchCreateJob

Inherits:
Hyrax::ApplicationJob show all
Defined in:
app/jobs/batch_create_job.rb

Instance Method Summary collapse

Instance Method Details

#perform(user, titles, resource_types, uploaded_files, attributes, operation) ⇒ Object

This copies metadata from the passed in attribute to all of the works that are members of the given upload set

Parameters:

  • user (User)
  • titles (Hash<String => String>)
  • resource_types (Hash<String => String>)
  • uploaded_files (Array<String>)

    Hyrax::UploadedFile IDs

  • attributes (Hash)

    attributes to apply to all works, including :model

  • operation (Hyrax::BatchCreateOperation)


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

def perform(user, titles, resource_types, uploaded_files, attributes, operation)
  operation.performing!
  titles ||= {}
  resource_types ||= {}
  create(user, titles, resource_types, uploaded_files, attributes, operation)
end