From 809b88e328e2151e569581741c7a1a7d44d15870 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Thu, 20 Aug 2020 12:54:18 +0200 Subject: [PATCH] Wait for 10 seconds instead of 20 when querying bugzilla failed This should make the script a little faster and 10 seconds should be enough. Signed-off-by: Pierre-Yves Chibon --- distgit_bugzilla_sync/script.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/distgit_bugzilla_sync/script.py b/distgit_bugzilla_sync/script.py index db64e92..8d545f5 100644 --- a/distgit_bugzilla_sync/script.py +++ b/distgit_bugzilla_sync/script.py @@ -114,6 +114,7 @@ def segment(iterable, chunk, fill=None): class BugzillaProxy: + def __init__(self, bz_server, username, password, config, pre_cache_users=True): self.bz_xmlrpc_server = bz_server self.username = username @@ -168,9 +169,9 @@ class BugzillaProxy: raise if self.config["verbose"]: print(f" ERROR {e}") - print(" - Query failed, going to try again in 20 seconds") - # Wait 20 seconds and try again - time.sleep(20) + print(" - Query failed, going to try again in 10 seconds") + # Wait 10 seconds and try again + time.sleep(10) return raw_data if self.config["bugzilla"]["compat_api"] == "getcomponentsdetails":