Speeding up loading of races by removing fix for bug 1345 as the problem described there no longer holds as races no longer are put in state FINISHED automagically

This commit is contained in:
Simon Pamies committed 2013-11-13 15:48:51 -02:00
1 parent 2841dec7d7
commit a5b5c2e40f
1 file changed
+4 -2
@@ -322,9 +322,11 @@ public class TracTracRaceTrackerImpl extends AbstractRaceTrackerImpl implements
}
};
// now run the command once immediately and synchronously; see also bug 1345
command.run();
// as we are no longer automatically putting races in state FINISHED we do not
// have to execute the scheduler synchronously anymore. This speeds up loading of races a lot.
// then schedule for periodic execution in background
ScheduledFuture<?> task = scheduler.scheduleWithFixedDelay(command, /* initialDelay */ 30000, /* delay */ 15000, /* unit */ TimeUnit.MILLISECONDS);
ScheduledFuture<?> task = scheduler.scheduleWithFixedDelay(command, /* initialDelay */ 5000, /* delay */ 15000, /* unit */ TimeUnit.MILLISECONDS);
return task;
}