Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
memoriav
Memobase 2020
services
Elasticsearch Services
Search Doc Service
Commits
8337414a
Commit
8337414a
authored
Jul 29, 2021
by
Jonas Waeber
Browse files
Add logging to comparison
parent
a2b75b9a
Pipeline
#30417
passed with stages
in 5 minutes and 4 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/main/kotlin/ch/memobase/KafkaTopology.kt
View file @
8337414a
...
...
@@ -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."
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment