[tor-commits] [bridgedb/master] Run scheduled tasks after server startup.

isis at torproject.org isis at torproject.org
Wed Nov 15 22:24:50 UTC 2017


commit 1112e2e650318c961e5eb8b4af574e9a825682b3
Author: Isis Lovecruft <isis at torproject.org>
Date:   Wed Nov 1 20:55:10 2017 +0000

    Run scheduled tasks after server startup.
---
 bridgedb/Main.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/bridgedb/Main.py b/bridgedb/Main.py
index 53b70c2..edd93cf 100644
--- a/bridgedb/Main.py
+++ b/bridgedb/Main.py
@@ -488,7 +488,10 @@ def run(options, reactor=reactor):
         for name, seconds in config.TASKS.items():
             if seconds:
                 try:
-                    tasks[name].start(abs(seconds))
+                    # Set now to False to get the servers up and running when
+                    # first started, rather than spend a bunch of time in
+                    # scheduled tasks.
+                    tasks[name].start(abs(seconds), now=False)
                 except KeyError:
                     logging.info("Task %s is disabled and will not run." % name)
                 else:





More information about the tor-commits mailing list