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

indicate player type in report

parent 3fbdce48
Pipeline #16876 passed with stages
in 8 minutes and 12 seconds
......@@ -109,25 +109,36 @@ class KafkaTopology extends Logging {
enrichableRecord: KStream[String, (String, List[ResourceWithLocator])]
): Unit =
enrichableRecord
.mapValues((k, _) =>
ReportingObject(k, ProcessingSuccess, "Record is enrichable").toString
.mapValues((k, v) => {
val distributedOn = v._2
.map(x =>
s"ebucore:isDistributedOn set to `${x.player.name}` for ${x.resource}"
)
.mkString("; ")
ReportingObject(
k,
ProcessingSuccess,
s"Record is enrichable; $distributedOn"
).toString
})
.to(SettingsFromFile.reportTopic)
private def reportUnenrichableRecords(
unenrichableRecord: KStream[String, (String, List[ResourceWithLocator])]
): Unit =
unenrichableRecord
.map((k, _) =>
(
k,
.mapValues((k, v) => {
val distributedOn = v._2
.map(x =>
s"ebucore:isDistributedOn set to `${x.player.name}` for ${x.resource}"
)
.mkString("; ")
ReportingObject(
k,
ProcessingSuccess,
"Record is not enrichable"
s"Record is not enrichable; $distributedOn"
).toString
)
)
})
.to(SettingsFromFile.reportTopic)
private def reportLocatorlessRecords(
......
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