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

use correct digital object id

parent 6c29958e
Pipeline #22162 passed with stages
in 3 minutes and 27 seconds
......@@ -176,7 +176,7 @@ trait MariadbClient {
*/
//noinspection ScalaStyle
def deleteMariaDBEntries(record: ProcessedRecord): ProcessedRecord = {
val digitalObjectId = getDigitalObjectId(s"${record.recordId}-1")
val digitalObjectId = record.recordId + "-1"
val updatedRecord = updateDigitalObjectResult(
record,
deleteRows(digitalObjectId)
......@@ -238,13 +238,4 @@ trait MariadbClient {
delete("iiif_manifests_v3")
)
}
private def getDigitalObjectId(recordId: String): String = {
val pattern = "https://memobase.ch/record/([^/#]+).*".r
pattern
.findFirstMatchIn(recordId)
.flatMap(id => Some(s"https://memobase.ch/digital/$id-1"))
.getOrElse("")
}
}
......@@ -49,7 +49,7 @@ trait MemobaseElasticClient {
ProcessingSuccess,
"Record deletion in Elasticsearch successful"
)
case success: RequestSuccess[_] =>
case _: RequestSuccess[_] =>
logger.debug(s"Deletion of record ${record.recordId} failed since record does not exists")
record.setRecordStatus(
ProcessingIgnore,
......
......@@ -45,7 +45,7 @@ trait MessageHandler {
def buildRecordProcessor(recordId: String): ProcessedRecord =
ProcessedRecord(
recordId,
recordId.replace("https://memobase.ch/record/", ""),
None,
List(),
ProcessResults()
......
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