Skip to content

Commit

Permalink
Router: Add a job which can clean up the subdbs periodically
Browse files Browse the repository at this point in the history
  • Loading branch information
eyedeekay committed Sep 7, 2023
1 parent 76fd9ab commit e2e6cb5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import net.i2p.data.router.RouterInfo;
import net.i2p.router.Job;
import net.i2p.router.RouterContext;
import net.i2p.router.networkdb.CleanupNetDbJob;
import net.i2p.router.networkdb.reseed.ReseedChecker;
import net.i2p.util.Log;

Expand All @@ -36,6 +37,7 @@ public FloodfillNetworkDatabaseSegmentor(RouterContext context) {
_context = context;
FloodfillNetworkDatabaseFacade subdb = new FloodfillNetworkDatabaseFacade(_context, MAIN_DBID);
_subDBs.put(MAIN_DBID, subdb);
_context.jobQueue().addJob(new CleanupNetDbJob(_context));
}

/*
Expand Down Expand Up @@ -112,7 +114,7 @@ public synchronized void shutdown() {
}
}

public synchronized void remove(String dbid){
private synchronized void remove(String dbid) {
if (dbid != null)
if (dbid.endsWith(".i2p"))
dbid = "clients_" + dbid;
Expand Down

0 comments on commit e2e6cb5

Please sign in to comment.