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

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



commit 1112e2e650318c961e5eb8b4af574e9a825682b3
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
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:



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