Class: MintRemoteIdentifierWorker
- Inherits:
-
Object
- Object
- MintRemoteIdentifierWorker
- Defined in:
- app/workers/mint_remote_identifier_worker.rb
Instance Attribute Summary collapse
-
#pid ⇒ Object
readonly
Returns the value of attribute pid.
-
#remote_service_name ⇒ Object
readonly
Returns the value of attribute remote_service_name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(pid, remote_service_name) ⇒ MintRemoteIdentifierWorker
constructor
A new instance of MintRemoteIdentifierWorker.
- #queue_name ⇒ Object
- #run ⇒ Object
Constructor Details
#initialize(pid, remote_service_name) ⇒ MintRemoteIdentifierWorker
Returns a new instance of MintRemoteIdentifierWorker.
11 12 13 14 |
# File 'app/workers/mint_remote_identifier_worker.rb', line 11 def initialize(pid, remote_service_name) @pid = pid @remote_service_name = remote_service_name end |
Instance Attribute Details
#pid ⇒ Object (readonly)
Returns the value of attribute pid.
10 11 12 |
# File 'app/workers/mint_remote_identifier_worker.rb', line 10 def pid @pid end |
#remote_service_name ⇒ Object (readonly)
Returns the value of attribute remote_service_name.
10 11 12 |
# File 'app/workers/mint_remote_identifier_worker.rb', line 10 def remote_service_name @remote_service_name end |
Class Method Details
.enqueue(pid, remote_service_name) ⇒ Object
2 3 4 |
# File 'app/workers/mint_remote_identifier_worker.rb', line 2 def self.enqueue(pid, remote_service_name) Sufia.queue.push(new(pid, remote_service_name)) end |
Instance Method Details
#queue_name ⇒ Object
6 7 8 |
# File 'app/workers/mint_remote_identifier_worker.rb', line 6 def queue_name :remote_identifiers end |
#run ⇒ Object
16 17 18 |
# File 'app/workers/mint_remote_identifier_worker.rb', line 16 def run Hydra::RemoteIdentifier.mint(remote_service_name, target) end |