- faster ping to clean up old peers faster

- clean up more news

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@8125 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 13 years ago
parent 35a9e8f307
commit f9216e388c

@ -575,8 +575,8 @@ crawlingCountryMustMatch=AD,AL,AT,BA,BE,BG,BY,CH,CY,CZ,DE,DK,EE,ES,FI,FO,FR,GG,G
20_dhtdistribution_idlesleep=15000
20_dhtdistribution_busysleep=10000
20_dhtdistribution_memprereq=12582912
30_peerping_idlesleep=60000
30_peerping_busysleep=60000
30_peerping_idlesleep=30000
30_peerping_busysleep=30000
30_peerping_memprereq=2097152
40_peerseedcycle_idlesleep=1800000
40_peerseedcycle_busysleep=1200000

@ -257,7 +257,8 @@ public class NewsPool {
categories.addAll(Arrays.asList(category));
}
private final static long MILLISECONDS_PER_DAY = 1000 * 60 * 60 * 24;
private final static long MILLISECONDS_PER_HOUR = 1000 * 60 * 60;
private final static long MILLISECONDS_PER_DAY = MILLISECONDS_PER_HOUR * 24;
private final NewsDB newsDB;
private final NewsQueue outgoingNews, publishedNews, incomingNews, processedNews;
@ -401,7 +402,7 @@ public class NewsPool {
if (record == null) return false;
if (record.category() == null) return true;
final long created = record.created().getTime();
if ((System.currentTimeMillis() - created) > (1L * MILLISECONDS_PER_DAY)) {
if ((System.currentTimeMillis() - created) > (6L * MILLISECONDS_PER_HOUR)) {
// remove everything after 1 day
return true;
}

@ -777,7 +777,7 @@ public final class Switchboard extends serverSwitch {
SwitchboardConstants.PEER_PING_METHOD_START,
SwitchboardConstants.PEER_PING_METHOD_JOBCOUNT,
SwitchboardConstants.PEER_PING_METHOD_FREEMEM,
60000, Long.MAX_VALUE, 60000, Long.MAX_VALUE),
30000, Long.MAX_VALUE, 30000, Long.MAX_VALUE),
2000);
deployThread(SwitchboardConstants.INDEX_DIST, "DHT Distribution", "selection, transfer and deletion of index entries that are not searched on your peer, but on others", null,
new InstantBusyThread(

Loading…
Cancel
Save