Commit 43c64c29 authored by Michael Ritter's avatar Michael Ritter
Browse files

Additional check to see if the audit was aborted or cancelled

parent 7cc0ca4c
...@@ -45,6 +45,7 @@ import edu.umiacs.ace.monitor.access.CollectionCountContext; ...@@ -45,6 +45,7 @@ import edu.umiacs.ace.monitor.access.CollectionCountContext;
import edu.umiacs.ace.monitor.compare.CollectionCompare2; import edu.umiacs.ace.monitor.compare.CollectionCompare2;
import edu.umiacs.ace.monitor.compare.CompareResults; import edu.umiacs.ace.monitor.compare.CompareResults;
import edu.umiacs.ace.monitor.core.Collection; import edu.umiacs.ace.monitor.core.Collection;
import edu.umiacs.ace.monitor.core.CollectionState;
import edu.umiacs.ace.monitor.core.ConfigConstants; import edu.umiacs.ace.monitor.core.ConfigConstants;
import edu.umiacs.ace.monitor.core.MonitoredItem; import edu.umiacs.ace.monitor.core.MonitoredItem;
import edu.umiacs.ace.monitor.core.MonitoredItemManager; import edu.umiacs.ace.monitor.core.MonitoredItemManager;
...@@ -729,10 +730,12 @@ public final class AuditThread extends Thread implements CancelCallback { ...@@ -729,10 +730,12 @@ public final class AuditThread extends Thread implements CancelCallback {
MonitoredItemManager mim = new MonitoredItemManager(em); MonitoredItemManager mim = new MonitoredItemManager(em);
if (mim.countErrorsInCollection(coll) == 0) { if (abortException != null || cancel) {
coll.setState('A'); coll.setState(CollectionState.INTERRUPTED);
} else if (mim.countErrorsInCollection(coll) == 0) {
coll.setState(CollectionState.ACTIVE);
} else { } else {
coll.setState('E'); coll.setState(CollectionState.ERROR);
} }
EntityTransaction trans = em.getTransaction(); EntityTransaction trans = em.getTransaction();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment