Sha256: 2acbdd0fee1125382ed59423065916b9e0720c4993a4d868777b8a2a1943b809

Contents?: true

Size: 496 Bytes

Versions: 13

Compression:

Stored size: 496 Bytes

Contents

class MintRemoteIdentifierWorker
  def self.enqueue(pid, remote_service_name)
    Sufia.queue.push(new(pid, remote_service_name))
  end

  def queue_name
    :remote_identifiers
  end

  attr_reader :pid, :remote_service_name
  def initialize(pid, remote_service_name)
    @pid = pid
    @remote_service_name = remote_service_name
  end

  def run
    Hydra::RemoteIdentifier.mint(remote_service_name, target)
  end

  private
  def target
    @target ||= ActiveFedora::Base.find(pid)
  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
curate-0.6.6 app/workers/mint_remote_identifier_worker.rb
curate-0.6.5 app/workers/mint_remote_identifier_worker.rb
curate-0.6.4 app/workers/mint_remote_identifier_worker.rb
curate-0.6.3 app/workers/mint_remote_identifier_worker.rb
curate-0.6.1 app/workers/mint_remote_identifier_worker.rb
curate-0.6.0 app/workers/mint_remote_identifier_worker.rb
curate-0.5.6 app/workers/mint_remote_identifier_worker.rb
curate-0.5.5 app/workers/mint_remote_identifier_worker.rb
curate-0.5.4 app/workers/mint_remote_identifier_worker.rb
curate-0.5.2 app/workers/mint_remote_identifier_worker.rb
curate-0.5.1 app/workers/mint_remote_identifier_worker.rb
curate-0.5.0 app/workers/mint_remote_identifier_worker.rb
curate-0.4.2 app/workers/mint_remote_identifier_worker.rb