Skip to content

Commit

Permalink
Router: set the netDb cleanup jobs to happen every minute
Browse files Browse the repository at this point in the history
  • Loading branch information
eyedeekay committed Sep 7, 2023
1 parent e2e6cb5 commit b7202e4
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
package net.i2p.router;
package net.i2p.router.networkdb;

import net.i2p.router.JobImpl;
import net.i2p.router.RouterContext;
import net.i2p.router.networkdb.kademlia.FloodfillNetworkDatabaseSegmentor;

public class CleanupNetDbJob extends JobImpl {
private final RouterContext ctx;
private static final long RERUN_DELAY_MS = 1 * 60 * 1000;

public CleanupNetDbJob(RouterContext context) {
super(context);
Expand All @@ -19,6 +22,7 @@ public String getName() {
public void runJob() {
FloodfillNetworkDatabaseSegmentor fnds = (FloodfillNetworkDatabaseSegmentor) ctx.netDb();
fnds.removeDeadSubDbs(ctx.clientManager().listClients());
requeue(RERUN_DELAY_MS);
}

}

0 comments on commit b7202e4

Please sign in to comment.