Sha256: fdd6b16b5c9744ecb46d81c1b5dbc3a8f3657a45fcc18246b8bffbaee4997313
Contents?: true
Size: 689 Bytes
Versions: 25
Compression:
Stored size: 689 Bytes
Contents
# frozen_string_literal: true class IngestJob < Hyrax::ApplicationJob queue_as Hyrax.config.ingest_queue_name after_perform do |job| # We want the lastmost Hash, if any. opts = job.arguments.reverse.detect { |x| x.is_a? Hash } || {} wrapper = job.arguments.first ContentNewVersionEventJob.perform_later(wrapper.file_set, wrapper.user) if opts[:notification] end # @param [JobIoWrapper] wrapper # @param [Boolean] notification send the user a notification, used in after_perform callback # @see 'config/initializers/hyrax_callbacks.rb' # rubocop:disable Lint/UnusedMethodArgument def perform(wrapper, notification: false) wrapper.ingest_file end end
Version data entries
25 entries across 25 versions & 1 rubygems