Fix bug in ingest pipelines code

This commit is contained in:
Richard Cordovano 2014-12-17 13:21:58 -05:00
parent 4c8b967773
commit ad886ad736

View File

@ -660,13 +660,13 @@ final class DataSourceIngestJob {
FileIngestPipeline pipeline = this.fileIngestPipelinesQueue.take(); FileIngestPipeline pipeline = this.fileIngestPipelinesQueue.take();
if (!pipeline.isEmpty()) { if (!pipeline.isEmpty()) {
AbstractFile file = task.getFile(); AbstractFile file = task.getFile();
++this.processedFiles; // RJCTODO: This was previously inside the lock
if (this.runInteractively) { synchronized (this.fileIngestProgressLock) {
/** ++this.processedFiles;
* Update the file ingest progress bar. if (this.runInteractively) {
*/ /**
synchronized (this.fileIngestProgressLock) { * Update the file ingest progress bar.
*/
if (this.processedFiles <= this.estimatedFilesToProcess) { if (this.processedFiles <= this.estimatedFilesToProcess) {
this.fileIngestProgress.progress(file.getName(), (int) this.processedFiles); this.fileIngestProgress.progress(file.getName(), (int) this.processedFiles);
} else { } else {