mirror of
https://github.com/internetarchive/heritrix3.git
synced 2026-09-25 07:05:49 +00:00
avoid creating unnecessary AlerthThreadGroups
This commit is contained in:
@@ -42,7 +42,6 @@ import org.archive.modules.FetchChain;
|
||||
import org.archive.modules.net.ServerCache;
|
||||
import org.archive.modules.seeds.SeedModule;
|
||||
import org.archive.spring.ConfigPath;
|
||||
import org.archive.util.ArchiveUtils;
|
||||
import org.archive.util.ReportUtils;
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
@@ -99,7 +99,6 @@ public class CrawlJob implements Comparable<CrawlJob>, ApplicationListener<Appli
|
||||
primaryConfig = cxml;
|
||||
isLaunchInfoPartial = false;
|
||||
scanJobLog(); // XXX look at launch directories instead/first?
|
||||
alertThreadGroup = new AlertThreadGroup(getShortName());
|
||||
}
|
||||
|
||||
public File getPrimaryConfig() {
|
||||
@@ -711,7 +710,11 @@ public class CrawlJob implements Comparable<CrawlJob>, ApplicationListener<Appli
|
||||
}
|
||||
|
||||
public int getAlertCount() {
|
||||
return alertThreadGroup.getAlertCount();
|
||||
if (alertThreadGroup != null) {
|
||||
return alertThreadGroup.getAlertCount();
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
protected StatisticsTracker getStats() {
|
||||
|
||||
Reference in New Issue
Block a user