Skip to content

Commit

Permalink
Improve code documentation for pmpy communication.
Browse files Browse the repository at this point in the history
  • Loading branch information
lagoan committed Feb 2, 2023
1 parent 5a3d545 commit 8f0f3b8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/models/jupiter_core/depositable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,9 @@ def push_entity_for_preservation
$queue.with do |connection|
# pushmi_pullyu requires both the id and type of the depositable
connection.zadd(queue_name, Time.now.to_f, { uuid: id, type: self.class.table_name }.to_json)
# Here we add the attempt pmpy will be trying to ingest the depositable. We start at 0
# Add the attempt count as value 0 that pmpy will use to count the tries to ingest the depositable. If the key
# already exists, the value will be reset to 0. the ```connection.zadd``` method called before resets the score as
# well. These two pieces of information let PMPY know that the entity needs to be deposited ASAP
connection.set("#{Rails.application.secrets.attempt_ingest_prefix}#{id}", 0)
end

Expand Down

0 comments on commit 8f0f3b8

Please sign in to comment.