[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [collector/master] Use a different history file for micro-consensus descriptors.
commit f4cb959d1e96b961aeb6f2841cd687d805e26e17
Author: iwakeh <iwakeh@xxxxxxxxxxxxxx>
Date: Tue Oct 25 17:43:57 2016 +0200
Use a different history file for micro-consensus descriptors.
---
src/main/java/org/torproject/collector/sync/SyncManager.java | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/main/java/org/torproject/collector/sync/SyncManager.java b/src/main/java/org/torproject/collector/sync/SyncManager.java
index 1390d50..ab7d4b6 100644
--- a/src/main/java/org/torproject/collector/sync/SyncManager.java
+++ b/src/main/java/org/torproject/collector/sync/SyncManager.java
@@ -78,15 +78,16 @@ public class SyncManager {
DescriptorReader descriptorReader
= DescriptorSourceFactory.createDescriptorReader();
descriptorReader.addDirectory(new File(base, entry.getKey()));
+ String histFileEnding = entry.getValue().getSimpleName()
+ + (entry.getKey().contains("consensus-microdesc")
+ ? "-micro" : "");
descriptorReader.setExcludeFiles(new File(basePath.toFile(),
"sync-history-" + source.getHost() + "-" + marker + "-"
- + entry.getValue().getSimpleName()));
- log.info("Reading {} of type {} ... ", marker,
- entry.getValue().getSimpleName());
+ + histFileEnding));
+ log.info("Reading {} of type {} ... ", marker, histFileEnding);
Iterator<DescriptorFile> descriptorFiles
= descriptorReader.readDescriptors();
- log.info("Done reading {} of type {}.",
- marker, entry.getValue().getSimpleName());
+ log.info("Done reading {} of type {}.", marker, histFileEnding);
Criterium crit = new ProcessCriterium(entry.getValue());
while (descriptorFiles.hasNext()) {
DescriptorFile descFile = descriptorFiles.next();
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits