wait timeout

This commit is contained in:
Greg DiCristofaro 2022-06-14 16:19:21 -04:00
parent 2f779a7b32
commit 525280baff
2 changed files with 10 additions and 8 deletions

View File

@ -509,15 +509,17 @@ public class CommandLineIngestManager extends CommandLineManager {
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.
*/
do {
ingestLock.wait();
} while (IngestManager.getInstance().isIngestRunning());
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();

View File

@ -2937,7 +2937,7 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen
* 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();