make the bulk export retention time configurable (#917)
* #710 make the bulk export retention time configurable * #710 spotless fix --------- Co-authored-by: Steve Swinsburg <steve.swinsburg@digitalhealth.gov.au>
This commit is contained in:
@@ -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<String> 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<String> allowed_origin = List.of("*");
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user