mirror of
https://github.com/i2p/i2p.i2p.git
synced 2026-10-23 17:23:13 +00:00
delay multiple ExploreJobs slightly
This commit is contained in:
1 parent
8e0dbf31ba
commit
14ea6d8d0a
1 file changed
+6
-1
@@ -62,8 +62,13 @@ class StartExplorersJob extends JobImpl {
|
||||
if (_log.shouldLog(Log.DEBUG))
|
||||
_log.debug("Keys to explore during this run: " + toExplore);
|
||||
_facade.removeFromExploreKeys(toExplore);
|
||||
long delay = 0;
|
||||
for (Hash key : toExplore) {
|
||||
getContext().jobQueue().addJob(new ExploreJob(getContext(), _facade, key));
|
||||
ExploreJob j = new ExploreJob(getContext(), _facade, key);
|
||||
if (delay > 0)
|
||||
j.getTiming().setStartAfter(getContext().clock().now() + delay);
|
||||
getContext().jobQueue().addJob(j);
|
||||
delay += 200;
|
||||
}
|
||||
}
|
||||
long delay = getNextRunDelay();
|
||||
|
||||
Reference in new issue
Block a user