right now ingesting is performed in a single job. if we enqueue a job for each work (after parsing metadata), we could leverage sidekiq's ability to run concurrent jobs
module Spot
class IngestWorkJob < ::ApplicationJob
def perform(work_type:, attributes:, depositing_user:)
work = work_type.constantize.new
env = Hyrax::Actors::Environment.new(work, Ability.new(depositing_user), attributes)
Hyrax::CurationConcern.actor.create(env)
end
end
end
Spot::IngestWorkJob.perform_later(work_type: 'Image',
attributes: { title: ['A Cool Work'] ... },
depositing_user: User.find_by_username('DeposiBot'))
right now ingesting is performed in a single job. if we enqueue a job for each work (after parsing metadata), we could leverage sidekiq's ability to run concurrent jobs