2831 added reset method for Central Repo in use counter

This commit is contained in:
William Schaefer 2017-09-06 17:38:20 -04:00
parent e3bdee42a6
commit b25fde5b3b
2 changed files with 12 additions and 2 deletions

View File

@ -194,7 +194,7 @@ public class CaseEventListener implements PropertyChangeListener {
*/
if ((null == evt.getOldValue()) && (evt.getNewValue() instanceof Case)) {
Case curCase = (Case) evt.getNewValue();
IngestEventsListener.resetIngestJobCounter();
try {
// only add default evidence tag if case is open and it doesn't already exist in the tags list.
if (Case.isCaseOpen()

View File

@ -86,7 +86,17 @@ public class IngestEventsListener {
* Repository.
*/
public synchronized static void disableCentralRepositoryModule() {
ingestJobCounter--; //Should be called once in the central repository module's shutdown method.
if (isCentralRepositoryModuleEnabled()) { //prevent it ingestJobCounter from going negative
ingestJobCounter--; //Should be called once in the central repository module's shutdown method.
}
}
/**
* Reset the counter which keeps track of if the Central Repository Module
* is being run during injest to 0.
*/
synchronized static void resetIngestJobCounter() {
ingestJobCounter = 0; //called when a case is opened in case for some reason counter was not reset
}
/**