Merge pull request #6872 from APriestman/7458_shutdownCleanup

7458 Set the data source processor so it can be cancelled if needed.
This commit is contained in:
Richard Cordovano
2021-04-05 16:15:24 -04:00
committed by GitHub
@@ -973,7 +973,7 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen
* job to be shut down in an orderly fashion.
*/
void cancelCurrentJob() {
if (State.RUNNING != state) {
if ((State.RUNNING != state) && (State.SHUTTING_DOWN != state)) {
return;
}
synchronized (jobsLock) {
@@ -2564,6 +2564,7 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen
synchronized (ingestLock) {
// Try each DSP in decreasing order of confidence
for (AutoIngestDataSourceProcessor selectedProcessor : validDataSourceProcessors) {
currentJob.setDataSourceProcessor(selectedProcessor);
UUID taskId = UUID.randomUUID();
caseForJob.notifyAddingDataSource(taskId);
DataSourceProcessorCallback callBack = new AddDataSourceCallback(caseForJob, dataSource, taskId, ingestLock);