Class: BatchCreateJob

Inherits:
ActiveJob::Base
  • Object
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, log) ⇒ 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 (Array<String>)
  • resource_types (Array<String>)
  • uploaded_files (Array<Sufia::UploadedFile>)
  • attributes (Hash)

    attributes to apply to all works

  • log (BatchCreateOperation)


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

def perform(user, titles, resource_types, uploaded_files, attributes, log)
  log.performing!

  titles ||= {}
  resource_types ||= {}

  create(user, titles, resource_types, uploaded_files, attributes, log)
end