Prepare for running relay descriptor downloader twice per hour.

This commit is contained in:
Karsten Loesing 2012-10-26 15:32:02 -04:00
parent 7db75dbedf
commit a2db139da1
4 changed files with 27 additions and 0 deletions

View File

@ -81,6 +81,13 @@ public class SanitizedBridgesWriter extends Thread {
private SecureRandom secureRandom;
public void run() {
if (((System.currentTimeMillis() / 60000L) % 60L) > 30L) {
/* Don't start in second half of an hour, when we only want to
* process other data. */
return;
}
File bridgeDirectoriesDirectory =
new File(config.getBridgeSnapshotsDirectory());
File sanitizedBridgesDirectory =

View File

@ -38,6 +38,13 @@ public class BridgePoolAssignmentsProcessor extends Thread {
}
public void run() {
if (((System.currentTimeMillis() / 60000L) % 60L) > 30L) {
/* Don't start in second half of an hour, when we only want to
* process other data. */
return;
}
File assignmentsDirectory =
new File(config.getAssignmentsDirectory());
File sanitizedAssignmentsDirectory =

View File

@ -27,6 +27,13 @@ public class ExitListDownloader extends Thread {
}
public void run() {
if (((System.currentTimeMillis() / 60000L) % 60L) > 30L) {
/* Don't start in second half of an hour, when we only want to
* process other data. */
return;
}
Logger logger = Logger.getLogger(ExitListDownloader.class.getName());
try {
logger.fine("Downloading exit list...");

View File

@ -42,6 +42,12 @@ public class TorperfDownloader extends Thread {
public void run() {
if (((System.currentTimeMillis() / 60000L) % 60L) > 30L) {
/* Don't start in second half of an hour, when we only want to
* process other data. */
return;
}
File torperfOutputDirectory =
new File(config.getTorperfOutputDirectory());
SortedMap<String, String> torperfSources = config.getTorperfSources();