Sha256: 1fbc24360d3f3a9dee50598e1700d7ec053a1388d61d96f9caf805fd1abaaadf

Contents?: true

Size: 478 Bytes

Versions: 24

Compression:

Stored size: 478 Bytes

Contents

# frozen_string_literal: true
module Hyrax
  # A common base class for all Hyrax jobs.
  # This allows downstream applications to manipulate all the hyrax jobs by
  # including modules on this class.
  class ApplicationJob < ::ApplicationJob
    before_enqueue do |job|
      job.arguments.map! do |arg|
        case arg
        when Valkyrie::Resource
          Hyrax::ValkyrieGlobalIdProxy.new(resource: arg)
        else
          arg
        end
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
hyrax-3.0.1 app/jobs/hyrax/application_job.rb
hyrax-3.0.0 app/jobs/hyrax/application_job.rb
hyrax-3.0.0.pre.rc4 app/jobs/hyrax/application_job.rb
hyrax-3.0.0.pre.rc3 app/jobs/hyrax/application_job.rb