fix for long waiting time during deletion of processed news

see http://forum.yacy.de/viewtopic.php?f=6&t=6

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3932 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 18 years ago
parent 9bbd39b67c
commit 87afdfc2a7

@ -95,14 +95,14 @@ public class News {
}
yacyNewsRecord record;
try {
// if ((tableID == yacyNewsPool.PROCESSED_DB) || (tableID == yacyNewsPool.PUBLISHED_DB)) {
// yacyCore.newsPool.clear(tableID);
// } else {
if ((tableID == yacyNewsPool.PROCESSED_DB) || (tableID == yacyNewsPool.PUBLISHED_DB)) {
yacyCore.newsPool.clear(tableID);
} else {
while (yacyCore.newsPool.size(tableID) > 0) {
record = yacyCore.newsPool.get(tableID, 0);
yacyCore.newsPool.moveOff(tableID, record.id());
}
// }
}
} catch (IOException e) {
e.printStackTrace();
}

@ -460,8 +460,7 @@ public class yacyNewsPool {
}
public void clear(int dbKey) {
// this is called if a queue element shall be moved to another queue or off the queue
// it depends on the dbKey how the record is handled
// clear a table
switch (dbKey) {
case INCOMING_DB: incomingNews.clear(); break;
case PROCESSED_DB: processedNews.clear(); break;

Loading…
Cancel
Save