bin/get-bugzilla-attachments-by-mimetype |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit 750f53a73fe6b817edc76329488d4b508d57c19b
Author:     Thorsten Behrens <thorsten.behr...@allotropia.de>
AuthorDate: Tue Dec 19 19:54:55 2023 +0100
Commit:     Thorsten Behrens <thorsten.behr...@allotropia.de>
CommitDate: Sun Dec 24 00:19:56 2023 +0100

    get-bz-attachments: set speaking thread names for job queue
    
    Change-Id: I38d637b8dd0f19330329565bf2e63c3c8463536c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161004
    Tested-by: Thorsten Behrens <thorsten.behr...@allotropia.de>
    Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de>

diff --git a/bin/get-bugzilla-attachments-by-mimetype 
b/bin/get-bugzilla-attachments-by-mimetype
index 9df55914360e..924a522ebff7 100755
--- a/bin/get-bugzilla-attachments-by-mimetype
+++ b/bin/get-bugzilla-attachments-by-mimetype
@@ -422,6 +422,14 @@ class manage_threads(threading.Thread):
                 # Use job parameters to call our query
                 # Then let the queue know we are done with this job
                 (uri, mimetype, prefix, extension) = jobs.get(True, 6)
+                try:
+                    # set thread name for easier debugging, if process
+                    # ctl package is available
+                    import prctl
+                    prctl.set_name(prefix[:3] + ': ' + mimetype[-10:])
+                except ImportError:
+                    pass
+
                 try:
                     get_through_rss_query(uri, mimetype, prefix, extension)
                 finally:

Reply via email to