Startup: Delay ReadConfigJob another minute

- code cleanup
This commit is contained in:
zzz
2014-10-07 12:04:55 +00:00
parent 6685acfef4
commit 088290c544
2 changed files with 3 additions and 4 deletions

View File

@@ -17,7 +17,7 @@ import net.i2p.util.Log;
/** This actually boots almost everything */ /** This actually boots almost everything */
class BootCommSystemJob extends JobImpl { class BootCommSystemJob extends JobImpl {
private Log _log; private final Log _log;
public static final String PROP_USE_TRUSTED_LINKS = "router.trustedLinks"; public static final String PROP_USE_TRUSTED_LINKS = "router.trustedLinks";
@@ -47,7 +47,7 @@ class BootCommSystemJob extends JobImpl {
getContext().jobQueue().addJob(new StartAcceptingClientsJob(getContext())); getContext().jobQueue().addJob(new StartAcceptingClientsJob(getContext()));
Job j = new ReadConfigJob(getContext()); Job j = new ReadConfigJob(getContext());
j.getTiming().setStartAfter(getContext().clock().now() + 60*1000); j.getTiming().setStartAfter(getContext().clock().now() + 2*60*1000);
getContext().jobQueue().addJob(j); getContext().jobQueue().addJob(j);
((RouterClock) getContext().clock()).addShiftListener(getContext().router()); ((RouterClock) getContext().clock()).addShiftListener(getContext().router());
} }

View File

@@ -46,8 +46,7 @@ public class ReadConfigJob extends JobImpl {
if (log.shouldLog(Log.WARN)) if (log.shouldLog(Log.WARN))
log.warn("Reloaded " + configFile); log.warn("Reloaded " + configFile);
} }
getTiming().setStartAfter(getContext().clock().now() + DELAY); requeue(DELAY);
getContext().jobQueue().addJob(this);
} }
private boolean shouldReread(File configFile) { private boolean shouldReread(File configFile) {