Sha256: 14e17ded03f1d2b67d4c09c7b2888bcb39526d9e1e77bfa3090047a0e39550b4

Contents?: true

Size: 413 Bytes

Versions: 22

Compression:

Stored size: 413 Bytes

Contents

class ActiveFedoraPidBasedJob
  def queue_name
    :pid_based
  end

  attr_accessor :pid

  def initialize(pid)
    self.pid = pid
  end

  def object
    @object ||= ActiveFedora::Base.find(pid, cast: true).tap do |f|
      f.reload_on_save = true
    end
  end
  alias_method :generic_file, :object
  alias_method :generic_file_id, :pid

  def run
    raise RuntimeError, "Define #run in a subclass"
  end
end

Version data entries

22 entries across 22 versions & 2 rubygems

Version Path
sufia-5.0.0 sufia-models/app/jobs/active_fedora_pid_based_job.rb
sufia-models-5.0.0 app/jobs/active_fedora_pid_based_job.rb
sufia-5.0.0.rc1 sufia-models/app/jobs/active_fedora_pid_based_job.rb
sufia-models-5.0.0.rc1 app/jobs/active_fedora_pid_based_job.rb
sufia-4.3.1 sufia-models/app/jobs/active_fedora_pid_based_job.rb
sufia-models-4.3.1 app/jobs/active_fedora_pid_based_job.rb
sufia-4.2.0 sufia-models/app/jobs/active_fedora_pid_based_job.rb
sufia-models-4.2.0 app/jobs/active_fedora_pid_based_job.rb
sufia-4.1.0 sufia-models/app/jobs/active_fedora_pid_based_job.rb
sufia-models-4.1.0 app/jobs/active_fedora_pid_based_job.rb
sufia-4.0.1 sufia-models/app/jobs/active_fedora_pid_based_job.rb
sufia-models-4.0.1 app/jobs/active_fedora_pid_based_job.rb
sufia-models-4.0.0 app/jobs/active_fedora_pid_based_job.rb
sufia-4.0.0 sufia-models/app/jobs/active_fedora_pid_based_job.rb
sufia-4.0.0.rc2 sufia-models/app/jobs/active_fedora_pid_based_job.rb
sufia-models-4.0.0.rc2 app/jobs/active_fedora_pid_based_job.rb
sufia-4.0.0.rc1 sufia-models/lib/sufia/models/jobs/active_fedora_pid_based_job.rb
sufia-models-4.0.0.rc1 lib/sufia/models/jobs/active_fedora_pid_based_job.rb
sufia-4.0.0.beta4 sufia-models/lib/sufia/models/jobs/active_fedora_pid_based_job.rb
sufia-models-4.0.0.beta4 lib/sufia/models/jobs/active_fedora_pid_based_job.rb