Commit c59981d1 authored by Thomas Bernhart's avatar Thomas Bernhart
Browse files

MEMO-899: Adapt logging during ingest of records

parent 6237478c
...@@ -48,8 +48,6 @@ class Ingester( ...@@ -48,8 +48,6 @@ class Ingester(
val data = recordOutput.toString() val data = recordOutput.toString()
fedoraClient.startTransaction().use { transaction -> fedoraClient.startTransaction().use { transaction ->
log.info("Ingesting record ${recordPair.first}.")
// create placeholders referenced resources: // create placeholders referenced resources:
val nonBinaryResources = rdfHandler.getReferencedNonBinaryResources() val nonBinaryResources = rdfHandler.getReferencedNonBinaryResources()
nonBinaryResources.forEach { resource -> nonBinaryResources.forEach { resource ->
...@@ -59,15 +57,17 @@ class Ingester( ...@@ -59,15 +57,17 @@ class Ingester(
} }
// ingest record, instantiations and binaries: // ingest record, instantiations and binaries:
log.info("Ingesting record ${recordPair.first}.")
transaction.createOrUpdateRdfResource(URI(recordPair.first), data, RdfContentTypes.NTRIPLES) transaction.createOrUpdateRdfResource(URI(recordPair.first), data, RdfContentTypes.NTRIPLES)
log.info("Ingested record ${recordPair.first}.")
ingestInstantiations(rdfHandler.getInstantiations(), transaction) ingestInstantiations(rdfHandler.getInstantiations(), transaction)
val sftpLocators = rdfHandler.getSftpLocators() val sftpLocators = rdfHandler.getSftpLocators()
if (sftpLocators.isNotEmpty()) { if (sftpLocators.isNotEmpty()) {
ingestBinaries(sftpLocators, rdfHandler, transaction) ingestBinaries(sftpLocators, rdfHandler, transaction)
} }
transaction.commit() transaction.commit()
log.info("Ingested record ${recordPair.first}.")
} }
log.info("End ingest of message with id $id.")
} }
private fun ingestInstantiations(instantiations: List<Pair<String, Model>>, transaction: FedoraTransactionClient) { private fun ingestInstantiations(instantiations: List<Pair<String, Model>>, transaction: FedoraTransactionClient) {
......
Markdown is supported
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