Skip to content

Commit 7a69091

Browse files
author
Adam Collins
committed
cleanup
1 parent b9b84ed commit 7a69091

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

grails-app/services/au/org/ala/spatial/SandboxService.groovy

+8-7
Original file line numberDiff line numberDiff line change
@@ -560,22 +560,23 @@ class SandboxService {
560560
sandboxIngress.message = "started"
561561
int result = pipelinesExecute(dwcaToSandboxOpts, new File(spatialConfig.data.dir + "/sandbox/processed/" + datasetID + "/logs/DwcaToSolrPipeline.log"), sandboxIngress)
562562

563-
if (result != 0) {
564-
sandboxIngress.status = "error"
565-
sandboxIngress.message = "DwcaToSolrPipeline failed"
566-
return
567-
}
568-
569-
// delete processing files
563+
// always delete processing files
570564
File processedDir = new File(spatialConfig.data.dir + "/sandbox/processed/" + datasetID);
571565
try {
566+
logger.error("processedDir " + processedDir.path + ", exists=" + processedDir.exists())
572567
if (processedDir.exists()) {
573568
FileUtils.deleteDirectory(processedDir);
574569
}
575570
} catch (IOException e) {
576571
logger.error("Error deleting directory: " + processedDir.getAbsolutePath(), e);
577572
}
578573

574+
if (result != 0) {
575+
sandboxIngress.status = "error"
576+
sandboxIngress.message = "DwcaToSolrPipeline failed"
577+
return
578+
}
579+
579580
// double check SOLR has the records
580581
try {
581582
long sleepMs = 500; // 0.5s

0 commit comments

Comments
 (0)