faster crawl profile list cleanup

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@442 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 20 years ago
parent e5a63c3c70
commit 81e564edb8

@ -72,6 +72,7 @@ public class IndexCreateWWWGlobalQueue_p {
String urlHash;
int c = switchboard.urlPool.noticeURL.stackSize(plasmaCrawlNURL.STACK_TYPE_LIMIT);
switchboard.urlPool.noticeURL.clear(plasmaCrawlNURL.STACK_TYPE_LIMIT);
switchboard.cleanProfiles();
/*
int c = 0;
while (switchboard.urlPool.noticeURL.stackSize(plasmaCrawlNURL.STACK_TYPE_LIMIT) > 0) {

@ -72,6 +72,8 @@ public class IndexCreateWWWLocalQueue_p {
String urlHash;
int c = switchboard.urlPool.noticeURL.stackSize(plasmaCrawlNURL.STACK_TYPE_CORE);
switchboard.urlPool.noticeURL.clear(plasmaCrawlNURL.STACK_TYPE_CORE);
switchboard.cleanProfiles();
prop.put("info", 3);//crawling queue cleared
prop.put("info_numEntries", c);
}

@ -86,6 +86,8 @@ public class IndexCreate_p {
prop.put("error", 0);
prop.put("info", 0);
prop.put("refreshbutton", 0);
switchboard.cleanProfiles();
int i;

@ -450,7 +450,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
initProfiles();
} catch (IOException e) {}
}
private void cleanProfiles() {
public void cleanProfiles() {
if ((sbQueue.size() > 0) || (cacheLoader.size() > 0) || (urlPool.noticeURL.stackSize() > 0)) return;
Iterator i = profiles.profiles(true);
plasmaCrawlProfile.entry entry;

Loading…
Cancel
Save