changeset 1234:31bed02844af

thread name in python sample
author Alain Mazy <am@orthanc.team>
date Wed, 03 Dec 2025 09:37:20 +0100
parents 30d87c98a58c
children 1696a417ca7a
files Sphinx/source/plugins/python/queues-and-kvs.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Sphinx/source/plugins/python/queues-and-kvs.py	Wed Dec 03 09:37:07 2025 +0100
+++ b/Sphinx/source/plugins/python/queues-and-kvs.py	Wed Dec 03 09:37:20 2025 +0100
@@ -10,6 +10,8 @@
 def ProcessQueueMessages():
     global is_worker_running
 
+    orthanc.SetCurrentThreadName("QUEUE-PROC")
+
     while is_worker_running:
         # get messages from the queue named "instances-to-process" that is stored in Orthanc DB.
         # Get the message from the FRONT for FIFO and from the BACK for a LIFO