clear ingest messages in execute() (earlier) if no ingest is running

This commit is contained in:
adam-m 2012-02-28 17:58:38 -05:00
commit 6d25d38b9f

View File

@ -130,8 +130,13 @@ public class IngestManager {
void execute(final Collection<IngestServiceAbstract> services, final Collection<Image> images) {
logger.log(Level.INFO, "Will enqueue number of images: " + images.size());
if (!isIngestRunning()) {
ui.clearMessages();
}
queueWorker = new EnqueueWorker(services, images);
queueWorker.execute();
ui.restoreMessages();
//logger.log(Level.INFO, "Queues: " + imageQueue.toString() + " " + fsContentQueue.toString());
}
@ -164,10 +169,6 @@ public class IngestManager {
logger.log(Level.INFO, "Image queue: " + this.imageQueue.toString());
logger.log(Level.INFO, "File queue: " + this.fsContentQueue.toString());
if (! isIngestRunning()) {
ui.clearMessages();
}
//image ingesters
// cycle through each image in the queue
while (hasNextImage()) {
@ -341,8 +342,7 @@ public class IngestManager {
if (fsContentQueue.hasServiceEnqueued((IngestServiceFsContent) service)) {
//has work enqueued, so running
return true;
}
else {
} else {
//not in the queue, but could still have bkg work running
return service.hasBackgroundJobsRunning();
}
@ -713,9 +713,10 @@ public class IngestManager {
break;
}
}
if (found == true)
if (found == true) {
break;
}
}
return found;
}