Unverified Commit 5d0b6d56 authored by Sebastian Schüpbach's avatar Sebastian Schüpbach
Browse files

more informative logging information


Signed-off-by: Sebastian Schüpbach's avatarSebastian Schüpbach <sebastian.schuepbach@unibas.ch>
parent 2d1c3d36
Pipeline #13403 passed with stages
in 6 minutes and 17 seconds
......@@ -86,17 +86,17 @@ class Ingester(
}
rdfHandler.getSftpLocators().forEach {
val digitalInstantiationUrl = it.first
it.second.let { path ->
if (path != null) {
sftpClient.open(File(path)).use { stream ->
val digitalInstantationUri = it.first
val binaryUri = "$digitalInstantationUri/binary"
val binaryUri = "${it.first}/binary"
try {
val mimeType = rdfHandler.getMimeType().first { mT ->
mT.first == digitalInstantationUri
mT.first == digitalInstantiationUrl
}.second
log.info("Ingesting binary $binaryUri with mime type $mimeType.")
fedoraClient.createOrUpdateBinaryResource(URI(binaryUri), stream, mimeType)
log.info("Ingested binary $binaryUri.")
producer.sendReport(
Report(binaryUri, ReportStatus.success, "Ingested a binary in fedora.")
)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment