- added cleanup for unused server loggings: they are removed after the client had not been seen since one hour

- removed configBasic popup trigger when no password is set

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4875 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 17 years ago
parent 5c6b983b8e
commit 9bef20b537

@ -3,7 +3,7 @@ javacSource=1.5
javacTarget=1.5
# Release Configuration
releaseVersion=0.587
releaseVersion=0.588
stdReleaseFile=yacy_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz
embReleaseFile=yacy_emb_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz
proReleaseFile=yacy_pro_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz

@ -81,7 +81,7 @@ public class AccessTracker_p {
prop.putNum("page_list_" + entCount + "_countHour", access.tailMap(new Long(System.currentTimeMillis() - 1000 * 60 * 60)).size());
entCount++;
}
} catch (ConcurrentModificationException e) {} // we dont want to synchronize this
} catch (ConcurrentModificationException e) {} // we don't want to synchronize this
prop.put("page_list", entCount);
prop.put("page_num", entCount);
@ -112,7 +112,7 @@ public class AccessTracker_p {
prop.putHTML("page_list_" + entCount + "_path", (String) entry.getValue());
entCount++;
}
} catch (ConcurrentModificationException e) {} // we dont want to synchronize this
} catch (ConcurrentModificationException e) {} // we don't want to synchronize this
}
} else {
try {

@ -1823,6 +1823,9 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.
// close unused connections
JakartaCommonsHttpClient.cleanup();
// clean up too old connection information
super.cleanupAccessTracker(1000 * 60 * 60);
// do transmission of CR-files
checkInterruption();
int count = rankingOwnDistribution.size() / 100;

@ -172,6 +172,16 @@ public abstract class serverAbstractSwitch<E> implements serverSwitch<E> {
return log;
}
/*
* remove all entries from the access tracker where the age of the last access is greater than the given timeout
*/
public void cleanupAccessTracker(long timeout) {
Iterator<Map.Entry<String, TreeMap<Long, String>>> i = accessTracker.entrySet().iterator();
while (i.hasNext()) {
if (i.next().getValue().tailMap(new Long(System.currentTimeMillis() - timeout)).size() == 0) i.remove();
}
}
public void track(String host, String accessPath) {
// learn that a specific host has accessed a specific path
if (accessPath == null) accessPath="NULL";

@ -354,8 +354,8 @@ public final class yacy {
final boolean browserPopUpTrigger = sb.getConfig("browserPopUpTrigger", "true").equals("true");
if (browserPopUpTrigger) {
String browserPopUpPage = sb.getConfig("browserPopUpPage", "ConfigBasic.html");
boolean properPW = (sb.getConfig("adminAccount", "").length() == 0) && (sb.getConfig(httpd.ADMIN_ACCOUNT_B64MD5, "").length() > 0);
if (!properPW) browserPopUpPage = "ConfigBasic.html";
//boolean properPW = (sb.getConfig("adminAccount", "").length() == 0) && (sb.getConfig(httpd.ADMIN_ACCOUNT_B64MD5, "").length() > 0);
//if (!properPW) browserPopUpPage = "ConfigBasic.html";
final String browserPopUpApplication = sb.getConfig("browserPopUpApplication", "netscape");
serverSystem.openBrowser((server.withSSL()?"https":"http") + "://localhost:" + serverCore.getPortNr(port) + "/" + browserPopUpPage, browserPopUpApplication);
}

Loading…
Cancel
Save