[Pkg-privacy-commits] [onionbalance] 06/117: Refactor how jobs are scheduled at startup

Donncha O'Cearbahill donncha-guest at moszumanska.debian.org
Wed Dec 16 23:18:41 UTC 2015


This is an automated email from the git hooks/post-receive script.

donncha-guest pushed a commit to branch debian/sid
in repository onionbalance.

commit b178286c2949876209459985dfc194363a402c02
Author: Donncha O'Cearbhaill <donncha at donncha.is>
Date:   Sun Apr 5 21:03:09 2015 +0100

    Refactor how jobs are scheduled at startup
---
 onion-balance/manager.py | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/onion-balance/manager.py b/onion-balance/manager.py
index cb4f2f9..b0282df 100755
--- a/onion-balance/manager.py
+++ b/onion-balance/manager.py
@@ -131,17 +131,15 @@ def main():
                                   EventType.HS_DESC,
                                   EventType.HS_DESC_CONTENT)
 
-    # Run initial fetch of HS instance descriptors
-    hiddenservice.fetch_all_descriptors(controller)
-    time.sleep(15)
-    hiddenservice.publish_all_descriptors()
-
     # Schedule descriptor fetch and upload events
     schedule.every(config.cfg.config.get('refresh')).seconds.do(
         hiddenservice.fetch_all_descriptors, controller)
     schedule.every(config.cfg.config.get('refresh')).seconds.do(
         hiddenservice.publish_all_descriptors)
 
+    # Run initial fetch of HS instance descriptors
+    schedule.run_all(delay_seconds=15)
+
     # Begin main loop to poll for HS descriptors
     try:
         while True:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/onionbalance.git



More information about the Pkg-privacy-commits mailing list