Method: Longleaf::MetadataPersistenceManager#persist
- Defined in:
- lib/longleaf/services/metadata_persistence_manager.rb
#persist(file_rec) ⇒ Object
Persist the metadata for the provided file record to all configured destinations. This may include to disk as well as to an index.
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/longleaf/services/metadata_persistence_manager.rb', line 17 def persist(file_rec) if file_rec..nil? raise MetadataError.new("No metadata record provided, cannot persist metadata for #{file_rec.path}") end MetadataSerializer::write(metadata: file_rec., file_path: file_rec., digest_algs: file_rec.storage_location..digests) index(file_rec) end |