From 8e179f6588a0ffc723c22372185287b947d29254 Mon Sep 17 00:00:00 2001 From: orbiter Date: Tue, 1 Jul 2008 23:47:33 +0000 Subject: [PATCH] removed option to do a re-crawl with a period of minutes. Such a short time does not make sense and it may cause endless indexing loops. The removing of the option will ensure that a misuse is prevented. git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4964 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/CrawlStart_p.html | 1 - htroot/CrawlStart_p.java | 8 ++------ htroot/WatchCrawler_p.java | 3 +-- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/htroot/CrawlStart_p.html b/htroot/CrawlStart_p.html index 2531e6e29..59a126570 100644 --- a/htroot/CrawlStart_p.html +++ b/htroot/CrawlStart_p.html @@ -93,7 +93,6 @@ - diff --git a/htroot/CrawlStart_p.java b/htroot/CrawlStart_p.java index e1ee43813..5b0dedd0d 100644 --- a/htroot/CrawlStart_p.java +++ b/htroot/CrawlStart_p.java @@ -46,7 +46,6 @@ public class CrawlStart_p { prop.put("crawlingIfOlderUnitMonthCheck", "0"); prop.put("crawlingIfOlderUnitDayCheck", "0"); prop.put("crawlingIfOlderUnitHourCheck", "0"); - prop.put("crawlingIfOlderUnitMinuteCheck", "0"); if ((crawlingIfOlder == -1) || (crawlingIfOlder == Integer.MAX_VALUE)) { prop.put("crawlingIfOlderNumber", "1"); prop.put("crawlingIfOlderUnitYearCheck", "1"); @@ -59,12 +58,9 @@ public class CrawlStart_p { } else if (crawlingIfOlder >= 60*24) { prop.put("crawlingIfOlderNumber", Math.round((float)crawlingIfOlder / (float)(60*24))); prop.put("crawlingIfOlderUnitDayCheck", "1"); - } else if (crawlingIfOlder >= 60) { - prop.put("crawlingIfOlderNumber", Math.round(crawlingIfOlder / 60f)); - prop.put("crawlingIfOlderUnitHourCheck", "1"); } else { - prop.put("crawlingIfOlderNumber", crawlingIfOlder); - prop.put("crawlingIfOlderUnitMinuteCheck", "1"); + prop.put("crawlingIfOlderNumber", Math.max(1, Math.round(crawlingIfOlder / 60f))); + prop.put("crawlingIfOlderUnitHourCheck", "1"); } int crawlingDomFilterDepth = (int) env.getConfigLong("crawlingDomFilterDepth", -1); prop.put("crawlingDomFilterCheck", (crawlingDomFilterDepth == -1) ? "0" : "1"); diff --git a/htroot/WatchCrawler_p.java b/htroot/WatchCrawler_p.java index b862c78e0..a537e08f2 100644 --- a/htroot/WatchCrawler_p.java +++ b/htroot/WatchCrawler_p.java @@ -384,8 +384,7 @@ public class WatchCrawler_p { if (crawlingIfOlderUnit.equals("month")) return recrawlIfOlderNumber * 60 * 24 * 30; if (crawlingIfOlderUnit.equals("day")) return recrawlIfOlderNumber * 60 * 24; if (crawlingIfOlderUnit.equals("hour")) return recrawlIfOlderNumber * 60; - if (crawlingIfOlderUnit.equals("minute")) return recrawlIfOlderNumber; - return -1; + return recrawlIfOlderNumber; } private static void setPerformance(plasmaSwitchboard sb, serverObjects post) {