Merge pull request #2845 from sleuthkit/eam_shutdown_workaround

Added isEnabled workaround to shutdown() method so that it doesn't at…
This commit is contained in:
Richard Cordovano 2017-06-14 14:05:44 -04:00 committed by GitHub
commit 256ce0f877

View File

@ -152,6 +152,17 @@ class IngestModule implements FileIngestModule {
@Override
public void shutDown() {
if (Boolean.parseBoolean(ModuleSettings.getConfigSetting("EnterpriseArtifactManager", "db.enabled")) == false
|| EamDb.getInstance().isEnabled() == false) {
/*
* Not signaling an error for now. This is a workaround for the way
* all newly didscovered ingest modules are automatically anabled.
*
* TODO (JIRA-2731): Add isEnabled API for ingest modules.
*/
return;
}
EamDb dbManager = EamDb.getInstance();
try {
dbManager.bulkInsertArtifacts();