mdr2.repair
Functions to handle repairing of a production
This mostly entails functionality to fetch a production from the archive.
A production is stored in the archive as a tar file. There is a HTTP API to the archive which is used to fetch productions. The tar file is then unpacked in a tmp dir inside the structured path (as there is not enough space in the /tmp dir). From this temporary location all the relevant files are copied to the structured path and the production is set to state “structured”. After that the repair takes its course down the same route as a normal production.
archive-identifier?
(archive-identifier? id)
Return true if id
is either a valid production id, i.e. a dam number or a valid library signature
archive-url
(archive-url container-id)
Return the url for an archived production given a container-id
container-id
(container-id production)
(container-id production sektion)
Return a container-id given a production
and optionally sektion
which can be either :master
or :dist-master
production-id-to-archive-id
(production-id-to-archive-id {:keys (id)})
(production-id-to-archive-id {:keys (id)} {:keys [connection]})
Return an archive id for a given production id, i.e. dam number