Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

if the crawl was paused (automatically), show the reason for pausing in the Crawler_p servlet.

orbiter2c3b0241961e
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 @@
</tr>
</tbody>
</table>
+ <div class="warning" id="message">&nbsp;#[queuemessage]#<div>
</fieldset>
<fieldset style="width:180px;height:140px;float:left;">
<legend>Index Size</legend>
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