mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 16:06:15 +00:00
2831 added reset method for Central Repo in use counter
This commit is contained in:
parent
e3bdee42a6
commit
b25fde5b3b
@ -194,7 +194,7 @@ public class CaseEventListener implements PropertyChangeListener {
|
|||||||
*/
|
*/
|
||||||
if ((null == evt.getOldValue()) && (evt.getNewValue() instanceof Case)) {
|
if ((null == evt.getOldValue()) && (evt.getNewValue() instanceof Case)) {
|
||||||
Case curCase = (Case) evt.getNewValue();
|
Case curCase = (Case) evt.getNewValue();
|
||||||
|
IngestEventsListener.resetIngestJobCounter();
|
||||||
try {
|
try {
|
||||||
// only add default evidence tag if case is open and it doesn't already exist in the tags list.
|
// only add default evidence tag if case is open and it doesn't already exist in the tags list.
|
||||||
if (Case.isCaseOpen()
|
if (Case.isCaseOpen()
|
||||||
|
@ -86,8 +86,18 @@ public class IngestEventsListener {
|
|||||||
* Repository.
|
* Repository.
|
||||||
*/
|
*/
|
||||||
public synchronized static void disableCentralRepositoryModule() {
|
public synchronized static void disableCentralRepositoryModule() {
|
||||||
|
if (isCentralRepositoryModuleEnabled()) { //prevent it ingestJobCounter from going negative
|
||||||
ingestJobCounter--; //Should be called once in the central repository module's shutdown method.
|
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
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wether or not the Central Repository Module is enabled for any of the
|
* Wether or not the Central Repository Module is enabled for any of the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user