Commit 8337414a authored by Jonas Waeber's avatar Jonas Waeber
Browse files

Add logging to comparison

parent a2b75b9a
Pipeline #30417 passed with stages
in 5 minutes and 4 seconds
......@@ -223,9 +223,15 @@ class KafkaTopology(
) {
val currentInstitutions =
elasticSearchWrapper.getExtraInstitutionsFromRecordSet(recordSetId, targetField)
return if (newInstitutions.containsAll(currentInstitutions) &&
currentInstitutions.containsAll(newInstitutions)
) {
log.info(
"Comparing the following lists: Current Institutions: $currentInstitutions; " +
"New Institutions: $newInstitutions."
)
val newHasAll = newInstitutions.containsAll(currentInstitutions)
val currentHasAll = currentInstitutions.containsAll(newInstitutions)
log.info("New Has ALl: $newHasAll")
log.info("Current has all: $currentHasAll")
return if (newHasAll && currentHasAll) {
log.info("No update for $targetField for $recordSetId as they are already current.")
} else {
log.info("Updating field $targetField for $recordSetId with $newInstitutions.")
......
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