mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-19 19:14:55 +00:00
Merge branch 'collaborative' of https://github.com/sleuthkit/autopsy into services_monitor
This commit is contained in:
commit
42a38f209a
@ -145,16 +145,18 @@ final class FileIngestPipeline {
|
||||
*/
|
||||
synchronized List<IngestModuleError> shutDown() {
|
||||
List<IngestModuleError> errors = new ArrayList<>();
|
||||
for (PipelineModule module : this.modules) {
|
||||
try {
|
||||
module.shutDown();
|
||||
} catch (Throwable ex) { // Catch-all exception firewall
|
||||
errors.add(new IngestModuleError(module.getDisplayName(), ex));
|
||||
String msg = ex.getMessage();
|
||||
// Jython run-time errors don't seem to have a message, but have details in toString.
|
||||
if (msg == null)
|
||||
msg = ex.toString();
|
||||
MessageNotifyUtil.Notify.error(module.getDisplayName() + " Error", msg);
|
||||
if(this.running == true){ // Don't shut down pipelines that never started
|
||||
for (PipelineModule module : this.modules) {
|
||||
try {
|
||||
module.shutDown();
|
||||
} catch (Throwable ex) { // Catch-all exception firewall
|
||||
errors.add(new IngestModuleError(module.getDisplayName(), ex));
|
||||
String msg = ex.getMessage();
|
||||
// Jython run-time errors don't seem to have a message, but have details in toString.
|
||||
if (msg == null)
|
||||
msg = ex.toString();
|
||||
MessageNotifyUtil.Notify.error(module.getDisplayName() + " Error", msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
this.running = false;
|
||||
|
@ -126,11 +126,13 @@ final class FilesIdentifierIngestModule implements FileIngestModule {
|
||||
*/
|
||||
@Override
|
||||
public void shutDown() {
|
||||
if (refCounter.decrementAndGet(this.context.getJobId()) == 0) {
|
||||
// Shutting down the last instance of this module for this ingest
|
||||
// job, so discard the interesting file sets definitions snapshot
|
||||
// for the job.
|
||||
FilesIdentifierIngestModule.interestingFileSetsByJob.remove(this.context.getJobId());
|
||||
if(context != null){
|
||||
if (refCounter.decrementAndGet(this.context.getJobId()) == 0) {
|
||||
// Shutting down the last instance of this module for this ingest
|
||||
// job, so discard the interesting file sets definitions snapshot
|
||||
// for the job.
|
||||
FilesIdentifierIngestModule.interestingFileSetsByJob.remove(this.context.getJobId());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -245,7 +245,7 @@ public final class KeywordSearchIngestModule implements FileIngestModule {
|
||||
public void shutDown() {
|
||||
logger.log(Level.INFO, "Instance {0}", instanceNum); //NON-NLS
|
||||
|
||||
if (initialized == false) {
|
||||
if ((initialized == false) || (context == null)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -314,6 +314,9 @@ public final class KeywordSearchIngestModule implements FileIngestModule {
|
||||
|
||||
synchronized(ingestStatus) {
|
||||
Map<Long, IngestStatus> ingestStatusForJob = ingestStatus.get(jobId);
|
||||
if(ingestStatusForJob == null){
|
||||
return;
|
||||
}
|
||||
for (IngestStatus s : ingestStatusForJob.values()) {
|
||||
switch (s) {
|
||||
case TEXT_INGESTED:
|
||||
|
Loading…
x
Reference in New Issue
Block a user