diff --git a/src/main/java/ca/uhn/fhir/jpa/starter/AppProperties.java b/src/main/java/ca/uhn/fhir/jpa/starter/AppProperties.java index 085b15f..96a4af2 100644 --- a/src/main/java/ca/uhn/fhir/jpa/starter/AppProperties.java +++ b/src/main/java/ca/uhn/fhir/jpa/starter/AppProperties.java @@ -131,6 +131,8 @@ public class AppProperties { private Integer expunge_thread_count = null; private Elasticsearch elasticsearch = null; + private Integer bulk_export_file_retention_period_hours = 2; + public List getCustomInterceptorClasses() { return custom_interceptor_classes; } @@ -856,6 +858,14 @@ public class AppProperties { this.elasticsearch = elasticsearch; } + public Integer getBulk_export_file_retention_period_hours() { + return bulk_export_file_retention_period_hours; + } + + public void setBulk_export_file_retention_period_hours(Integer bulk_export_file_retention_period_hours) { + this.bulk_export_file_retention_period_hours = bulk_export_file_retention_period_hours; + } + public static class Cors { private Boolean allow_Credentials = true; private List allowed_origin = List.of("*"); diff --git a/src/main/java/ca/uhn/fhir/jpa/starter/common/FhirServerConfigCommon.java b/src/main/java/ca/uhn/fhir/jpa/starter/common/FhirServerConfigCommon.java index 88c5874..e16a194 100644 --- a/src/main/java/ca/uhn/fhir/jpa/starter/common/FhirServerConfigCommon.java +++ b/src/main/java/ca/uhn/fhir/jpa/starter/common/FhirServerConfigCommon.java @@ -302,6 +302,12 @@ public class FhirServerConfigCommon { jpaStorageSettings.setHSearchIndexPrefix(indexPrefix != null ? indexPrefix : ""); } + // Configure the bulk export file retention period + if (appProperties.getBulk_export_file_retention_period_hours() != null) { + jpaStorageSettings.setBulkExportFileRetentionPeriodHours( + appProperties.getBulk_export_file_retention_period_hours()); + } + return jpaStorageSettings; } diff --git a/src/main/resources/application-cds.yaml b/src/main/resources/application-cds.yaml index 2b0f4d7..31394df 100644 --- a/src/main/resources/application-cds.yaml +++ b/src/main/resources/application-cds.yaml @@ -267,6 +267,7 @@ hapi: # ------------------------------------------------------------------------------- bulk_export_enabled: false bulk_import_enabled: false + bulk_export_file_retention_period_hours: 2 # ------------------------------------------------------------------------------- # F. Write / Delete / Integrity diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index 07e3961..44cd922 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -291,6 +291,7 @@ hapi: # ------------------------------------------------------------------------------- bulk_export_enabled: false bulk_import_enabled: false + bulk_export_file_retention_period_hours: 2 # ------------------------------------------------------------------------------- # F. Write / Delete / Integrity