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

[or-cvs] r21686: {torctl} Stop recording OS. It can have junk in it that SQLAlchemy ha (torctl/branches/stable/python/TorCtl)



Author: mikeperry
Date: 2010-02-18 07:57:22 +0000 (Thu, 18 Feb 2010)
New Revision: 21686

Modified:
   torctl/branches/stable/python/TorCtl/SQLSupport.py
Log:

Stop recording OS. It can have junk in it that SQLAlchemy
hates.

Also wait a bit more for stray descriptors to arrive before
deciding to update our consensus statistics.



Modified: torctl/branches/stable/python/TorCtl/SQLSupport.py
===================================================================
--- torctl/branches/stable/python/TorCtl/SQLSupport.py	2010-02-18 07:55:34 UTC (rev 21685)
+++ torctl/branches/stable/python/TorCtl/SQLSupport.py	2010-02-18 07:57:22 UTC (rev 21686)
@@ -90,7 +90,9 @@
     self.idhex = router.idhex
     self.orhash = router.orhash
     self.nickname = router.nickname
-    self.os = router.os
+    # XXX: Temporary hack. router.os can contain unicode, which makes
+    # us barf. Apparently 'Text' types can't have unicode chars?
+    # self.os = router.os
     self.rate_limited = router.rate_limited
     self.guard = "Guard" in router.flags
     self.exit = "Exit" in router.flags
@@ -744,7 +746,7 @@
       # A lighterweight hack might be to just make the scanners pause
       # on a condition used to signal we are doing this (and other) heavy 
       # lifting. We could have them possibly check self.last_desc_at..
-      if not self.wait_for_signal and e.arrived_at - self.last_desc_at > 30.0:
+      if not self.wait_for_signal and e.arrived_at - self.last_desc_at > 60.0:
         if not PathSupport.PathBuilder.is_urgent_event(e):
           plog("INFO", "Newdesc timer is up. Assuming we have full consensus")
           self._update_rank_history(self.consensus.ns_map.iterkeys())