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 {
}
def buildRecordProcessor(
recordId: String,
headers: Headers
): ProcessedRecord =
recordId: String,
headers: Headers
): ProcessedRecord =
ProcessedRecord(
recordId.replace("https://memobase.ch/record/", ""),
None,
List(),
ProcessResults(),
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 = {
......
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