mirror of
https://github.com/internetarchive/heritrix3.git
synced 2026-11-09 07:24:41 +00:00
[HER-1721] pressing build immediately after adding or creating a new job gives
IOE * JobResource.java presentablify(), writeHtml() - make sure crawl log exists before attempting to read and serve it
This commit is contained in:
1 parent
e15f49dd60
commit
6edbc5181e
1 file changed
+4
-2
@@ -159,7 +159,8 @@ public class JobResource extends Resource {
|
||||
info.put("frontierReport", cj.frontierReportData());
|
||||
info.put("heapReport", getEngine().heapReportData());
|
||||
|
||||
if(cj.isRunning() || (cj.hasApplicationContext() && !cj.isLaunchable())) {
|
||||
if ((cj.isRunning() || (cj.hasApplicationContext() && !cj.isLaunchable()))
|
||||
&& cj.getCrawlController().getLoggerModule().getCrawlLogPath().getFile().exists()) {
|
||||
try {
|
||||
List<String> logLines = new LinkedList<String>();
|
||||
FileUtils.pagedLines(
|
||||
@@ -392,7 +393,8 @@ public class JobResource extends Resource {
|
||||
pw.println("<br/><b>Memory</b><br/> ");
|
||||
pw.println(getEngine().heapReport());
|
||||
|
||||
if(cj.isRunning() || (cj.hasApplicationContext() && !cj.isLaunchable())) {
|
||||
if ((cj.isRunning() || (cj.hasApplicationContext() && !cj.isLaunchable()))
|
||||
&& cj.getCrawlController().getLoggerModule().getCrawlLogPath().getFile().exists()) {
|
||||
// show crawl log for running or finished crawls
|
||||
pw.println("<h3>Crawl Log");
|
||||
printLinkedFile(
|
||||
|
||||
Reference in new issue
Block a user