bin/get-bugzilla-attachments-by-mimetype | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
New commits: commit 82cf116fe646c822bc91b4ae0a6c4e6e948a6f4d Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Thu Jan 6 11:04:23 2022 +0100 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Thu Jan 6 19:13:48 2022 +0100 get-bugzilla-attachments-by-mimetype: query different bzs concurrently Downside is we can't easily detect when one tracker is done, but it should be faster. Change-Id: Ie78ddf0381690040d7a4fa06f910717fcdfe0eae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128038 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/bin/get-bugzilla-attachments-by-mimetype b/bin/get-bugzilla-attachments-by-mimetype index 47669d04434a..a38b6ea95bca 100755 --- a/bin/get-bugzilla-attachments-by-mimetype +++ b/bin/get-bugzilla-attachments-by-mimetype @@ -547,11 +547,12 @@ class manage_threads(threading.Thread): break def generate_multi_threading(): - for (prefix, uri) in rss_bugzillas: - # Initialize threads - for i in range(max_threads): - manage_threads().start() + # Initialize threads + for i in range(max_threads): + manage_threads().start() + + for (prefix, uri) in rss_bugzillas: # Create a job for every mimetype for a bugzilla for (mimetype,extension) in mimetypes.items(): @@ -565,8 +566,9 @@ def generate_multi_threading(): print("successfully placed a job in the queue searching for " + mimetype + " in bugtracker " + prefix) # Continue when all mimetypes are done for a bugzilla - jobs.join() - print("DONE with bugtracker " + prefix) + print("STARTED all bugtracker " + prefix) + + jobs.join() max_threads = 20 # Number of threads to create, (1 = without multi-threading) jobs = queue.Queue()