Commit 9776628b authored by Jonas Waeber's avatar Jonas Waeber
Browse files

add logging

parent 012aa9a1
Pipeline #26116 passed with stages
in 14 minutes and 39 seconds
......@@ -217,8 +217,10 @@ class KafkaTopology(
val update =
updateInstitutionContainer(value, targetField)
if (update == null) {
log.info("No update for $targetField for ${value.id} as they are already current.")
KeyValue(key, null)
} else {
log.info("Updating field $targetField for ${value.id} with ${value.name}.")
KeyValue(
"$key#update",
update
......@@ -240,8 +242,10 @@ class KafkaTopology(
elasticSearchWrapper.getExtraInstitutionsFromRecordSet(recordSet.id, targetField)
)
) {
log.info("No update for $targetField for ${recordSet.id} as they are already current.")
null
} else {
log.info("Updating field $targetField for ${recordSet.id} with ${recordSet.institution}.")
updateQueryBuilder.updateInstitutionContainers(
recordSet.id,
targetField,
......@@ -254,8 +258,10 @@ class KafkaTopology(
elasticSearchWrapper.getExtraInstitutionsFromRecordSet(recordSet.id, targetField)
)
) {
log.info("No update for $targetField for ${recordSet.id} as they are already current.")
null
} else {
log.info("Updating field $targetField for ${recordSet.id} with ${recordSet.masterInstitution}.")
updateQueryBuilder.updateInstitutionContainers(
recordSet.id,
targetField,
......@@ -268,8 +274,10 @@ class KafkaTopology(
elasticSearchWrapper.getExtraInstitutionsFromRecordSet(recordSet.id, targetField)
)
) {
log.info("No update for $targetField for ${recordSet.id} as they are already current.")
null
} else {
log.info("Updating field $targetField for ${recordSet.id} with ${recordSet.originalInstitution}.")
updateQueryBuilder.updateInstitutionContainers(
recordSet.id,
targetField, recordSet.originalInstitution
......@@ -281,8 +289,10 @@ class KafkaTopology(
elasticSearchWrapper.getExtraInstitutionsFromRecordSet(recordSet.id, targetField)
)
) {
log.info("No update for $targetField for ${recordSet.id} as they are already current.")
null
} else {
log.info("Updating field $targetField for ${recordSet.id} with ${recordSet.accessInstitution}.")
updateQueryBuilder.updateInstitutionContainers(
recordSet.id,
targetField,
......
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