Commit 9a282a53 authored by leeroy's avatar leeroy Committed by Karsten Loesing
Browse files

Add parse history for archives.

parent 445f3030
# Changes in version ???
* Medium changes
- Add a parse history for imported descriptor archives.
# Changes in version 4.0-1.2.0 - 2017-02-28
* Medium changes
......
......@@ -11,5 +11,6 @@ enum DescriptorHistory {
BRIDGE_STATUS_HISTORY,
BRIDGE_SERVER_HISTORY,
BRIDGE_EXTRAINFO_HISTORY,
ARCHIVED_HISTORY
}
......@@ -149,6 +149,9 @@ class DescriptorQueue {
case BRIDGE_SERVER_HISTORY:
historyFileName = "bridge-server-history";
break;
case ARCHIVED_HISTORY:
historyFileName = "archived-history";
break;
default:
log.error("Unknown descriptor history. Not excluding "
+ "files.");
......
......@@ -172,7 +172,9 @@ public class DescriptorSource {
}
log.info("Reading archived descriptors...");
this.archiveDescriptorQueue = new DescriptorQueue(this.inArchiveDir,
null, null);
null, this.statusDir);
this.archiveDescriptorQueue.readHistoryFile(
DescriptorHistory.ARCHIVED_HISTORY);
Descriptor descriptor;
while ((descriptor = this.archiveDescriptorQueue.nextDescriptor())
!= null) {
......@@ -217,6 +219,7 @@ public class DescriptorSource {
descriptorListener.processDescriptor(descriptor, relay);
}
}
this.archiveDescriptorQueue.writeHistoryFile();
log.info("Read archived descriptors");
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment