[tor-commits] [bridgedb/master] Parse bridge descriptors in a separate thread.

isis at torproject.org isis at torproject.org
Sun Jan 12 06:06:32 UTC 2014


commit 8f4cad05500bfc3113713535aa494f8ef5ca878d
Author: Isis Lovecruft <isis at torproject.org>
Date:   Fri Nov 15 16:13:50 2013 +0000

    Parse bridge descriptors in a separate thread.
    
    TODO: In the future, we will probably want to add some secondary, temporary
    HTTPServer which serves a simple "BridgeDB is down for maintenance and will be
    back shortly!" page while the descriptors are being parsed.
    
     * FIXES #5232: Import bridges into BridgeDB in a separate thread and database
       transaction.
---
 lib/bridgedb/Main.py |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/bridgedb/Main.py b/lib/bridgedb/Main.py
index 3729a17..5e64599 100644
--- a/lib/bridgedb/Main.py
+++ b/lib/bridgedb/Main.py
@@ -495,6 +495,8 @@ def startup(options, rundir, configFile):
 
         logging.debug("Saving state again before reparsing descriptors...")
         state.save()
+        logging.info("Reparsing bridge descriptors...")
+        reactor.callInThread(load, state, splitter, clear=False)
 
         state = persistent.load()
         logging.info("Bridges loaded: %d" % len(splitter))





More information about the tor-commits mailing list