remove more news (all older than one day) because they can be a performance problem if we have too many peers sending news

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@8112 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 13 years ago
parent 8fa7f5656e
commit 550c881d80

@ -401,8 +401,8 @@ public class NewsPool {
if (record == null) return false; if (record == null) return false;
if (record.category() == null) return true; if (record.category() == null) return true;
final long created = record.created().getTime(); final long created = record.created().getTime();
if ((System.currentTimeMillis() - created) > (7L * MILLISECONDS_PER_DAY)) { if ((System.currentTimeMillis() - created) > (1L * MILLISECONDS_PER_DAY)) {
// remove everything after 1 week // remove everything after 1 day
return true; return true;
} }
if ((record.category().equals(CATEGORY_WIKI_UPDATE)) && if ((record.category().equals(CATEGORY_WIKI_UPDATE)) &&

Loading…
Cancel
Save