diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2022-01-06 11:04:23 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2022-01-06 19:13:48 +0100 |
commit | 82cf116fe646c822bc91b4ae0a6c4e6e948a6f4d (patch) | |
tree | 8ce344165ccd24135187e2164d05e23f31cfe260 /bin | |
parent | 7df70a1cdcec43352e25fca9fdb5687bdb0616a6 (diff) |
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.stahl@allotropia.de>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/get-bugzilla-attachments-by-mimetype | 14 |
1 files changed, 8 insertions, 6 deletions
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() |