simplify fire service event, add more logging

This commit is contained in:
adam-m 2012-06-13 17:04:25 -04:00
parent 6afd841c9d
commit a69b25b08b

View File

@ -960,15 +960,9 @@ public class IngestManager {
stats.start(); stats.start();
//notify main thread services started //notify main thread services started
SwingUtilities.invokeLater(new Runnable() { for (IngestServiceAbstractFile s : AbstractFileServices) {
IngestManager.fireServiceEvent(SERVICE_STARTED_EVT, s.getName());
@Override }
public void run() {
for (IngestServiceAbstractFile s : AbstractFileServices) {
IngestManager.fireServiceEvent(SERVICE_STARTED_EVT, s.getName());
}
}
});
final String displayName = "File Ingest"; final String displayName = "File Ingest";
progress = ProgressHandleFactory.createHandle(displayName, new Cancellable() { progress = ProgressHandleFactory.createHandle(displayName, new Cancellable() {
@ -1041,7 +1035,10 @@ public class IngestManager {
@Override @Override
protected void done() { protected void done() {
try { try {
Date d1 = new Date();
super.get(); //block and get all exceptions thrown while doInBackground() super.get(); //block and get all exceptions thrown while doInBackground()
Date d2 = new Date();
logger.log(Level.INFO, "File ingest get() took: " + (d2.getTime()-d1.getTime()) );
//notify services of completion //notify services of completion
if (!this.isCancelled()) { if (!this.isCancelled()) {
for (IngestServiceAbstractFile s : AbstractFileServices) { for (IngestServiceAbstractFile s : AbstractFileServices) {