diff --git a/src/main/java/org/alliancegenome/curation_api/jobs/executors/LoadFileExecutor.java b/src/main/java/org/alliancegenome/curation_api/jobs/executors/LoadFileExecutor.java index 712e7fd78..ee4dc8183 100644 --- a/src/main/java/org/alliancegenome/curation_api/jobs/executors/LoadFileExecutor.java +++ b/src/main/java/org/alliancegenome/curation_api/jobs/executors/LoadFileExecutor.java @@ -219,7 +219,7 @@ protected boolean runLoad(BaseUpser protected boolean runLoad(BaseUpsertServiceInterface service, BulkLoadFileHistory history, BackendBulkDataProvider dataProvider, List objectList, List idsAdded, Boolean terminateFailing, String countType, String dataType) { if (Thread.currentThread().isInterrupted()) { - return false; + throw new RuntimeException("Thread isInterrupted"); } ProcessDisplayHelper ph = new ProcessDisplayHelper(); ph.addDisplayHandler(loadProcessDisplayService); @@ -259,9 +259,7 @@ protected boolean runLoad(BaseUpser } ph.progressProcess(); if (Thread.currentThread().isInterrupted()) { - history.setBulkloadStatus(JobStatus.FORCED_STOPPED); - Log.info("Thread Interrupted:"); - break; + throw new RuntimeException("Thread isInterrupted"); } } updateHistory(history); @@ -278,7 +276,7 @@ protected boolean runLoad(BaseUpser // The following methods are for bulk validation protected > void runCleanup(S service, BulkLoadFileHistory history, String dataProviderName, List annotationIdsBefore, List annotationIdsAfter, String loadTypeString, Boolean deprecate) { if (Thread.currentThread().isInterrupted()) { - return; + throw new RuntimeException("Thread isInterrupted"); } Log.debug("runLoad: After: " + dataProviderName + " " + annotationIdsAfter.size()); @@ -314,9 +312,7 @@ protected boolean runLoad(BaseUpser } ph.progressProcess(); if (Thread.currentThread().isInterrupted()) { - history.setBulkloadStatus(JobStatus.FORCED_STOPPED); - Log.info("Thread Interrupted:"); - break; + throw new RuntimeException("Thread isInterrupted"); } } updateHistory(history);