[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [depictor/master] Download compress documents, and lower the timeout to 30 seconds.



commit 026bfdb53f59bdfcddcd60bfe852a8e2567dc709
Author: Tom Ritter <tom@xxxxxxxxx>
Date:   Sat Jan 27 18:19:52 2018 -0600

    Download compress documents, and lower the timeout to 30 seconds.
---
 utility.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/utility.py b/utility.py
index aeb7b8d..65dc423 100644
--- a/utility.py
+++ b/utility.py
@@ -18,7 +18,7 @@ def get_bwauths():
 	return dict((k.lower(), v) for (k, v) in stem.descriptor.remote.get_authorities().items() if v.is_bandwidth_authority)
 
 downloader = stem.descriptor.remote.DescriptorDownloader(
-	timeout = 60,
+	timeout = 30,
 	fall_back_to_authority = False,
 	document_handler = stem.descriptor.DocumentHandler.DOCUMENT,
 )
@@ -30,7 +30,7 @@ def get_consensuses():
 	:returns: tuple of the form ({authority => consensus}, issues, runtimes)
 	"""
 
-	return _get_documents('consensus', '/tor/status-vote/current/consensus')
+	return _get_documents('consensus', '/tor/status-vote/current/consensus.z')
 
 
 def get_votes():
@@ -40,7 +40,7 @@ def get_votes():
 	:returns: tuple of the form ({authority => vote}, issues, runtimes)
 	"""
 
-	return _get_documents('vote', '/tor/status-vote/current/authority')
+	return _get_documents('vote', '/tor/status-vote/current/authority.z')
 
 
 def _get_documents(label, resource):
@@ -67,7 +67,7 @@ def _get_documents(label, resource):
 				v3ident = authority.v3ident
 
 				query = downloader.query(
-					'/tor/status-vote/current/%s' % v3ident,
+					'/tor/status-vote/current/%s.z' % v3ident,
 					default_params = False,
 				)
 

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits