Verified Commit ac8a6c4a authored by Sebastian Schüpbach's avatar Sebastian Schüpbach
Browse files

catch missing dryrun value

parent 2eaec81d
Pipeline #27774 passed with stages
in 4 minutes and 13 seconds
...@@ -45,16 +45,16 @@ trait MessageHandler { ...@@ -45,16 +45,16 @@ trait MessageHandler {
} }
def buildRecordProcessor( def buildRecordProcessor(
recordId: String, recordId: String,
headers: Headers headers: Headers
): ProcessedRecord = ): ProcessedRecord =
ProcessedRecord( ProcessedRecord(
recordId.replace("https://memobase.ch/record/", ""), recordId.replace("https://memobase.ch/record/", ""),
None, None,
List(), List(),
ProcessResults(), ProcessResults(),
headers, headers,
headers.headers("dryRun").asScala.last.value()(0).toInt == 1 headers.headers("dryRun").asScala.lastOption.flatMap(x => Some(x.value()(0).toInt == 1)).getOrElse(false)
) )
def consumerClose(): Unit = { def consumerClose(): Unit = {
......
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