Fix AIM crash recovery putting joh in wrong list

This commit is contained in:
Richard Cordovano 2019-04-10 16:13:53 -04:00
parent f051b124c9
commit 2f17df455f

View File

@ -1271,12 +1271,12 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen
* @param nodeData The data stored in the manifest file coordination * @param nodeData The data stored in the manifest file coordination
* service node for the job. * service node for the job.
* *
* @throws AutoIngestJobException If there was an error working * @throws AutoIngestJobException If there was an error working with the
* with the node data. * node data.
* @throws InterruptedException If the thread running the input * @throws InterruptedException If the thread running the input
* directory scan task is * directory scan task is interrupted
* interrupted while blocked, i.e., * while blocked, i.e., if auto ingest is
* if auto ingest is shutting down. * shutting down.
*/ */
private void addPendingJob(Manifest manifest, AutoIngestJobNodeData nodeData) throws AutoIngestJobException, InterruptedException { private void addPendingJob(Manifest manifest, AutoIngestJobNodeData nodeData) throws AutoIngestJobException, InterruptedException {
AutoIngestJob job; AutoIngestJob job;
@ -1415,6 +1415,8 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen
sysLogger.log(Level.SEVERE, String.format("Error writing case auto ingest log entry for crashed job for %s", manifestPath), ex); sysLogger.log(Level.SEVERE, String.format("Error writing case auto ingest log entry for crashed job for %s", manifestPath), ex);
} }
} }
updateAutoIngestJobData(job);
newPendingJobsList.add(job);
} else { } else {
job.setProcessingStatus(AutoIngestJob.ProcessingStatus.COMPLETED); job.setProcessingStatus(AutoIngestJob.ProcessingStatus.COMPLETED);
job.setCompletedDate(Date.from(Instant.now())); job.setCompletedDate(Date.from(Instant.now()));
@ -1425,9 +1427,9 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen
sysLogger.log(Level.SEVERE, String.format("Error writing case auto ingest log entry for crashed job for %s", manifestPath), ex); sysLogger.log(Level.SEVERE, String.format("Error writing case auto ingest log entry for crashed job for %s", manifestPath), ex);
} }
} }
updateAutoIngestJobData(job);
newCompletedJobsList.add(job);
} }
updateAutoIngestJobData(job);
newPendingJobsList.add(job);
} }
} }
} }
@ -1440,12 +1442,12 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen
* @param nodeData The data stored in the manifest file lock * @param nodeData The data stored in the manifest file lock
* coordination service node for the job. * coordination service node for the job.
* *
* @throws AutoIngestJobException If there was an error working * @throws AutoIngestJobException If there was an error working with the
* with the node data. * node data.
* @throws InterruptedException If the thread running the input * @throws InterruptedException If the thread running the input
* directory scan task is * directory scan task is interrupted
* interrupted while blocked, i.e., * while blocked, i.e., if auto ingest is
* if auto ingest is shutting down. * shutting down.
*/ */
private void addCompletedJob(Manifest manifest, AutoIngestJobNodeData nodeData) throws AutoIngestJobException, InterruptedException { private void addCompletedJob(Manifest manifest, AutoIngestJobNodeData nodeData) throws AutoIngestJobException, InterruptedException {
Path caseDirectoryPath = nodeData.getCaseDirectoryPath(); Path caseDirectoryPath = nodeData.getCaseDirectoryPath();