Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
when a new crawl is started, an equal crawl, if still running, is terminated and the corresponding crawl profile is deleted (this also clears the crawl queue entries for that crawl profile)
Michael Peter Christen85ca07b90e83
diff --git a/htroot/Crawler_p.java b/htroot/Crawler_p.javaindex dd607bfa8..615393757 100644--- a/htroot/Crawler_p.java+++ b/htroot/Crawler_p.java@@ -372,6 +372,12 @@ public class Crawler_p {collection);byte[] handle = ASCII.getBytes(profile.handle());+ // before we fire up a new crawl, we make sure that another crawl with the same name is not running+ sb.crawler.removeActive(handle);+ sb.crawler.removePassive(handle);+ try {sb.crawlQueues.noticeURL.removeByProfileHandle(profile.handle(), 10000);} catch (SpaceExceededException e1) {}++ // start the crawlif ("url".equals(crawlingMode)) {if (rootURLs.size() == 0) {prop.put("info", "5"); //Crawling faileddiff --git a/source/net/yacy/crawler/data/CrawlProfile.java b/source/net/yacy/crawler/data/CrawlProfile.javaindex 52a4b663c..2f6aa3d92 100644--- a/source/net/yacy/crawler/data/CrawlProfile.java+++ b/source/net/yacy/crawler/data/CrawlProfile.java@@ -155,7 +155,7 @@ public class CrawlProfile extends ConcurrentHashMap<String, String> implements Mif (name == null || name.isEmpty()) {throw new NullPointerException("name must not be null or empty");}- if (name.length() > 60) name = name.substring(0, 60);+ if (name.length() > 256) name = name.substring(256);this.doms = new ConcurrentHashMap<String, DomProfile>();final String handle = Base64Order.enhancedCoder.encode(Digest.encodeMD5Raw(name)).substring(0, Word.commonHashLength);put(HANDLE, handle);