diff --git a/Core/src/org/sleuthkit/autopsy/commandlineingest/CommandLineIngestManager.java b/Core/src/org/sleuthkit/autopsy/commandlineingest/CommandLineIngestManager.java index 7b9686e1c4639dcdea1ae06f123200dd77267a93..650baf9053770a2e7aa01b55ebce62fc2f3d1bdb 100755 --- a/Core/src/org/sleuthkit/autopsy/commandlineingest/CommandLineIngestManager.java +++ b/Core/src/org/sleuthkit/autopsy/commandlineingest/CommandLineIngestManager.java @@ -509,13 +509,18 @@ private void analyze(AutoIngestDataSource dataSource, String ingestProfileName) if (settingsWarnings.isEmpty()) { IngestJobStartResult ingestJobStartResult = IngestManager.getInstance().beginIngestJob(dataSource.getContent(), ingestJobSettings); IngestJob ingestJob = ingestJobStartResult.getJob(); - if (null != ingestJob) { + if (null != ingestJob) { /* - * Block until notified by the ingest job event - * listener or until interrupted because auto ingest - * is shutting down. + * Block until notified by the ingest job event listener + * or until interrupted because auto ingest is shutting + * down. For very small jobs, it is possible that ingest has + * completed by the time we get here, so check periodically + * in case the event was missed. */ - ingestLock.wait(); + while (IngestManager.getInstance().isIngestRunning()) { + ingestLock.wait(60000); // Check every minute + } + LOGGER.log(Level.INFO, "Finished ingest modules analysis for {0} ", dataSource.getPath()); IngestJob.ProgressSnapshot jobSnapshot = ingestJob.getSnapshot(); IngestJob.ProgressSnapshot.DataSourceProcessingSnapshot snapshot = jobSnapshot.getDataSourceProcessingSnapshot(); diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java index d4f789a8619996480583c6a88d3fcaed3e469659..787be9cc30d2032db1e016fc57a2bbc97c01c282 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java @@ -2819,7 +2819,7 @@ private void analyze(AutoIngestDataSource dataSource) throws AnalysisStartupExce * in case the event was missed. */ while (IngestManager.getInstance().isIngestRunning()) { - ingestLock.wait(300000); // Check every five minutes + ingestLock.wait(60000); // Check every minute } IngestJob.ProgressSnapshot jobSnapshot = ingestJob.getSnapshot(); IngestJob.ProgressSnapshot.DataSourceProcessingSnapshot snapshot = jobSnapshot.getDataSourceProcessingSnapshot();