Skip to content

Commit 026dee8

Browse files
committed
add debug threads
1 parent 93c3282 commit 026dee8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

hkube_python_wrapper/wrapper/algorunner.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from __future__ import print_function, division, absolute_import
22

3+
import threading
34
import time
45

56
from hkube_python_wrapper.util.DaemonThread import DaemonThread
@@ -50,6 +51,7 @@ def __init__(self):
5051
self._runningStartThread = None
5152
self._stopped = False
5253
self._redirectLogs = False
54+
self._printThread = 0
5355
DaemonThread.__init__(self, "WorkerListener")
5456

5557
@staticmethod
@@ -349,6 +351,12 @@ def _discovery_update(self, discovery):
349351

350352
def _setupStreamingProducer(self, nodeName):
351353
def onStatistics(statistics):
354+
thread_list = ""
355+
self._printThread = self._printThread + 1
356+
for thread in threading.enumerate():
357+
thread_list = thread_list + " " + str(thread.name)
358+
if (self._printThread % 30 == 0):
359+
log.debug("thread list: " + thread_list)
352360
self._sendCommand(messages.outgoing.streamingStatistics, statistics)
353361

354362
producerConfig = {}

0 commit comments

Comments
 (0)