mirror of
https://github.com/internetarchive/heritrix3.git
synced 2026-07-21 06:51:38 +00:00
part of fix for HER-1736 long pause at startup reading large per-job job.log(s)
* CrawlJob.java
return early from scanJobLog() when job log > 1GB
This commit is contained in:
@@ -152,6 +152,13 @@ public class CrawlJob implements Comparable<CrawlJob>, ApplicationListener {
|
||||
launchCount = 0;
|
||||
if(!jobLog.exists()) return;
|
||||
|
||||
// protect against scanning "large" job logs, which significantly
|
||||
// slows the web UI
|
||||
if (jobLog.length() > org.apache.commons.io.FileUtils.ONE_GB) {
|
||||
launchCount = -1;
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
LineIterator lines = FileUtils.lineIterator(jobLog);
|
||||
Pattern launchLine = Pattern.compile("(\\S+) (\\S+) Job launched");
|
||||
|
||||
Reference in New Issue
Block a user