diff options
| author | iwakeh <iwakeh@torproject.org> | 2016-07-20 11:11:37 +0200 |
|---|---|---|
| committer | iwakeh <iwakeh@torproject.org> | 2016-07-20 13:29:33 +0200 |
| commit | 03b832d01d90382ea4afc23bfeb0dedcb84e3649 (patch) | |
| tree | 9094fa90ff5a251594ac07751402395e5bb00659 | |
| parent | 2f725efbf6a527bee8663fca3751da7069787625 (diff) | |
Added new properties for scheduled module runs and adapted tests accordingly. Scheduler implementation open. Partially implements task-19018.
| -rw-r--r-- | src/main/java/org/torproject/collector/conf/Key.java | 15 | ||||
| -rw-r--r-- | src/main/resources/collector.properties | 32 | ||||
| -rw-r--r-- | src/test/java/org/torproject/collector/conf/ConfigurationTest.java | 2 |
3 files changed, 47 insertions, 2 deletions
diff --git a/src/main/java/org/torproject/collector/conf/Key.java b/src/main/java/org/torproject/collector/conf/Key.java index 4f5df64..d98b05d 100644 --- a/src/main/java/org/torproject/collector/conf/Key.java +++ b/src/main/java/org/torproject/collector/conf/Key.java @@ -15,6 +15,21 @@ public enum Key { RecentPath(Path.class), IndexPath(Path.class), StatsPath(Path.class), + BridgedescsActivated(Boolean.class), + BridgedescsOffsetMinutes(Integer.class), + BridgedescsPeriodMinutes(Integer.class), + ExitlistsActivated(Boolean.class), + ExitlistsOffsetMinutes(Integer.class), + ExitlistsPeriodMinutes(Integer.class), + RelaydescsActivated(Boolean.class), + RelaydescsOffsetMinutes(Integer.class), + RelaydescsPeriodMinutes(Integer.class), + TorperfActivated(Boolean.class), + TorperfOffsetMinutes(Integer.class), + TorperfPeriodMinutes(Integer.class), + UpdateindexActivated(Boolean.class), + UpdateindexOffsetMinutes(Integer.class), + UpdateindexPeriodMinutes(Integer.class), BridgeSnapshotsDirectory(Path.class), CachedRelayDescriptorsDirectories(String[].class), CompressRelayDescriptorDownloads(Boolean.class), diff --git a/src/main/resources/collector.properties b/src/main/resources/collector.properties index fb9e1b4..94ead4d 100644 --- a/src/main/resources/collector.properties +++ b/src/main/resources/collector.properties @@ -1,5 +1,36 @@ ######## Collector Properties # +######## Run Configuration ######## +## the following defines, if this module is activated +BridgedescsActivated = false +# period in minutes +BridgedescsPeriodMinutes = 60 +# offset in minutes since the epoch and +BridgedescsOffsetMinutes = 9 +## the following defines, if this module is activated +ExitlistsActivated = false +# period in minutes +ExitlistsPeriodMinutes = 60 +# offset in minutes since the epoch and +ExitlistsOffsetMinutes = 2 +## the following defines, if this module is activated +RelaydescsActivated = false +# period in minutes +RelaydescsPeriodMinutes = 30 +# offset in minutes since the epoch and +RelaydescsOffsetMinutes = 5 +## the following defines, if this module is activated +TorperfActivated = false +# period in minutes +TorperfPeriodMinutes = 360 +# offset in minutes since the epoch and +TorperfOffsetMinutes = 1 +# the following defines, if this module is activated +UpdateindexActivated = false +# period in minutes +UpdateindexPeriodMinutes = 2 +# offset in minutes since the epoch and +UpdateindexOffsetMinutes = 0 ######## General Properties ######## InstanceBaseUrl = "https://collector.torproject.org" LockFilePath = lock @@ -7,7 +38,6 @@ IndexPath = out/index ArchivePath = out/archive RecentPath = out/recent StatsPath = out/stats - ######## Relay descriptors ######## # ## Read cached-* files from a local Tor data directory diff --git a/src/test/java/org/torproject/collector/conf/ConfigurationTest.java b/src/test/java/org/torproject/collector/conf/ConfigurationTest.java index 57dda75..3fe3982 100644 --- a/src/test/java/org/torproject/collector/conf/ConfigurationTest.java +++ b/src/test/java/org/torproject/collector/conf/ConfigurationTest.java @@ -22,7 +22,7 @@ public class ConfigurationTest { public void testKeyCount() throws Exception { assertEquals("The number of properties keys in enum Key changed." + "\n This test class should be adapted.", - 32, Key.values().length); + 47, Key.values().length); } @Test() |
