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

add heap profile


Signed-off-by: Sebastian Schüpbach's avatarSebastian Schüpbach <sebastian.schuepbach@unibas.ch>
parent 9109e222
Pipeline #22295 passed with stages
in 5 minutes and 20 seconds
FROM openjdk:8-jre-slim-buster
ADD target/scala-2.12/app.jar /app/app.jar
ENTRYPOINT ["java", "-jar", "/app/app.jar"]
ENTRYPOINT ["java", "-jar", "/app/app.jar", "-XX:+HeapDumpOnOutOfMemoryError", "-XX:HeapDumpPath=/data/heapdump.hprof"]
......@@ -17,6 +17,9 @@ spec:
spec:
containers:
- name: import-process-administrator-container
volumeMounts:
- name: media-volume
mountPath: /data
args: # Customise to match your needs
- "--record-set-filter <id>"
- "--record-filter <id>"
......@@ -41,4 +44,9 @@ spec:
- name: POLL_TIMEOUT
value: "60000"
restartPolicy: Never
volumes:
- name: media-volume
persistentVolumeClaim:
claimName: media-volume-claim
backoffLimit: 1
/*
* Import Process Delete
* Copyright (C) 2020 Memoriav
* Copyright (C) 2021 Memoriav
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
......@@ -18,12 +18,12 @@
package ch.memobase
import java.text.SimpleDateFormat
import java.util.Calendar
import ch.memobase.models.Report
import org.apache.logging.log4j.scala.Logging
import java.text.SimpleDateFormat
import java.util.Calendar
trait MsgFilter {
self: Logging =>
......@@ -36,13 +36,15 @@ trait MsgFilter {
institutions: Seq[String],
recordSets: Seq[String],
records: Seq[String],
sessions: Seq[String]): Seq[FilterFun] =
sessions: Seq[String]): Seq[FilterFun] = {
logger.info("Build filters")
Seq(buildCreatedAfterFilter(standardiseTimestamp(createdAfter))) ++
Seq(buildCreatedBeforeFilter(standardiseTimestamp(createdBefore))) ++
institutions.map(v => buildInstitutionIdFilter(v)) ++
records.map(v => buildRecordIdFilter(v)) ++
recordSets.map(v => buildRecordSetIdFilter(v)) ++
sessions.map(v => buildSessionIdFilter(v))
}
private def standardiseTimestamp(calendar: Calendar): String =
......
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