From 2c3b0241961e4a86f34e380dac33590f88dab989 Mon Sep 17 00:00:00 2001 From: orbiter Date: Tue, 9 Apr 2013 18:55:26 +0200 Subject: [PATCH] if the crawl was paused (automatically), show the reason for pausing in the Crawler_p servlet. --- htroot/Crawler_p.html | 1 + htroot/Crawler_p.java | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/htroot/Crawler_p.html b/htroot/Crawler_p.html index 404ddcc82..5394a44b6 100644 --- a/htroot/Crawler_p.html +++ b/htroot/Crawler_p.html @@ -73,6 +73,7 @@ +
 #[queuemessage]#
Index Size diff --git a/htroot/Crawler_p.java b/htroot/Crawler_p.java index 003958f8b..291346528 100644 --- a/htroot/Crawler_p.java +++ b/htroot/Crawler_p.java @@ -102,8 +102,10 @@ public class Crawler_p { final String queue = post.get("continue", ""); if ("localcrawler".equals(queue)) { sb.continueCrawlJob(SwitchboardConstants.CRAWLJOB_LOCAL_CRAWL); + sb.setConfig(SwitchboardConstants.CRAWLJOB_LOCAL_CRAWL + "_isPaused_cause", ""); } else if ("remotecrawler".equals(queue)) { sb.continueCrawlJob(SwitchboardConstants.CRAWLJOB_REMOTE_TRIGGERED_CRAWL); + sb.setConfig(SwitchboardConstants.CRAWLJOB_REMOTE_TRIGGERED_CRAWL + "_isPaused_cause", ""); } } @@ -116,7 +118,9 @@ public class Crawler_p { sb.pauseCrawlJob(SwitchboardConstants.CRAWLJOB_REMOTE_TRIGGERED_CRAWL, "user request in Crawler_p from " + header.refererHost()); } } - + String queuemessage = sb.getConfig(SwitchboardConstants.CRAWLJOB_LOCAL_CRAWL + "_isPaused_cause", ""); + prop.putHTML("queuemessage", queuemessage.length() == 0 ? "" : "pause reason: " + queuemessage); + if (post != null && post.containsKey("terminate")) try { final String handle = post.get("handle", ""); // termination of a crawl: shift the crawl from active to passive