mirror of
https://github.com/torproject/collector.git
synced 2024-11-27 03:10:28 +00:00
Prepare for running relay descriptor downloader twice per hour.
This commit is contained in:
parent
7db75dbedf
commit
a2db139da1
@ -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 =
|
||||
|
@ -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 =
|
||||
|
@ -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...");
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user