Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Network Health
Metrics
Onionoo
Commits
9a282a53
Commit
9a282a53
authored
Jul 15, 2015
by
leeroy
Committed by
Karsten Loesing
Apr 01, 2017
Browse files
Add parse history for archives.
parent
445f3030
Changes
4
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.md
View file @
9a282a53
# 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
...
...
src/main/java/org/torproject/onionoo/updater/DescriptorHistory.java
View file @
9a282a53
...
...
@@ -11,5 +11,6 @@ enum DescriptorHistory {
BRIDGE_STATUS_HISTORY
,
BRIDGE_SERVER_HISTORY
,
BRIDGE_EXTRAINFO_HISTORY
,
ARCHIVED_HISTORY
}
src/main/java/org/torproject/onionoo/updater/DescriptorQueue.java
View file @
9a282a53
...
...
@@ -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."
);
...
...
src/main/java/org/torproject/onionoo/updater/DescriptorSource.java
View file @
9a282a53
...
...
@@ -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"
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment