]> git.mxchange.org Git - quix0rs-apt-p2p.git/blobdiff - const.py
Remove the obsolete whrandom module and use random instead.
[quix0rs-apt-p2p.git] / const.py
index d81ecbd45f021de20eebd6c2c3faca37240a0f94..fc5d1c0a49110071ab1825fd8b0f5b1e4654c128 100644 (file)
--- a/const.py
+++ b/const.py
@@ -1,9 +1,23 @@
+## Copyright 2002-2003 Andrew Loewenstern, All Rights Reserved
+# see LICENSE.txt for license information
+
+"""
 from twisted.internet.default import SelectReactor ## twistedmatrix.com
 
-reactor = SelectReactor(installSignalHandlers=0)
+reactor = SelectReactor()
+
 from twisted.internet import main
 main.installReactor(reactor)
 
+
+try:
+    import twisted.names.client
+    reactor.installResolver(twisted.names.client.theResolver)
+except IOError:
+    print "no resolv.conf!"
+"""
+from twisted.internet import reactor
+
 # magic id to use before we know a peer's id
 NULL_ID =  20 * '\0'
 
@@ -33,7 +47,7 @@ MAX_FAILURES = 3
 MIN_PING_INTERVAL = 60 * 15 # fifteen minutes
 
 # refresh buckets that haven't been touched in this long
-BUCKET_STALENESS = 60 # one hour
+BUCKET_STALENESS = 60 * 60 # one hour
 
 
 ###  KEY EXPIRER
@@ -41,7 +55,7 @@ BUCKET_STALENESS = 60 # one hour
 KEINITIAL_DELAY = 15 # 15 seconds - to clean out old stuff in persistent db
 
 # time between expirer runs
-KE_DELAY = 60 * 60 # 1 hour
+KE_DELAY = 60 * 20 # 20 minutes
 
 # expire entries older than this
-KE_AGE = 60 * 60 * 24 # 24 hours
+KE_AGE = 60 * 60 # 60 minutes